File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
ARG GO_VER="1.22"
2
2
ARG ALPINE_VER="3.20"
3
- ARG ALPINE_MIRROR="https://mirror.yandex.ru/mirrors/alpine/v${ALPINE_VER}/main/"
4
3
5
4
# first build stage
6
5
# by default uses alpine-based image
@@ -10,8 +9,8 @@ FROM golang:${GO_VER}-alpine${ALPINE_VER} AS builder
10
9
WORKDIR /src
11
10
12
11
# install updates and build executable
13
- RUN apk update --no-cache -X ${ALPINE_MIRROR}
14
- RUN apk upgrade --no-cache -X ${ALPINE_MIRROR}
12
+ RUN apk update --no-cache -X https://mirror.yandex.ru/mirrors/alpine/v${ALPINE_VER}/main
13
+ RUN apk upgrade --no-cache -X https://mirror.yandex.ru/mirrors/alpine/v${ALPINE_VER}/main
15
14
RUN apk add make git
16
15
17
16
COPY . .
@@ -21,13 +20,12 @@ RUN make .install-goose
21
20
# second release stage
22
21
FROM alpine:${ALPINE_VER}
23
22
ARG ALPINE_VER
24
- ARG ALPINE_MIRROR
25
23
26
24
# create user other than root and install updated
27
25
RUN addgroup -g 101 app && \
28
26
adduser -H -u 101 -G app -s /bin/sh -D app && \
29
- apk update --no-cache -X ${ALPINE_MIRROR} && \
30
- apk upgrade --no-cache -X ${ALPINE_MIRROR}
27
+ apk update --no-cache -X https://mirror.yandex.ru/mirrors/alpine/v${ALPINE_VER}/main && \
28
+ apk upgrade --no-cache -X https://mirror.yandex.ru/mirrors/alpine/v${ALPINE_VER}/main
31
29
32
30
# place all necessary executables and other files into /app directory
33
31
WORKDIR /app/
You can’t perform that action at this time.
0 commit comments