ソースを参照

Add cache mount for apk downloads

tags/v2.2.0^2^2
9seconds 1ヶ月前
コミット
4dca1d2b07
1個のファイルの変更6行の追加5行の削除
  1. 6
    5
      Dockerfile

+ 6
- 5
Dockerfile ファイルの表示

@@ -5,11 +5,12 @@ FROM golang:1.26-alpine AS build
5 5
 
6 6
 ENV CGO_ENABLED=0
7 7
 
8
-RUN set -x \
9
-  && apk --no-cache --update add \
10
-    bash \
11
-    ca-certificates \
12
-    git
8
+RUN --mount=type=cache,target=/var/cache/apk \
9
+    set -x \
10
+    && apk --update add \
11
+      bash \
12
+      ca-certificates \
13
+      git
13 14
 
14 15
 COPY go.mod go.sum /app/
15 16
 WORKDIR /app

読み込み中…
キャンセル
保存