Skip to content

Commit c7f3723

Browse files
committed
[Docker] Fix alpine apk fetch error in container when building image
1 parent 0e31072 commit c7f3723

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM node:12-alpine3.11 as build
22

33
WORKDIR /tmp
44

5+
RUN sed -i -e 's/http:/https:/' /etc/apk/repositories
6+
57
RUN apk update && apk add --no-cache --virtual .build-deps \
68
python \
79
g++ \
@@ -35,6 +37,7 @@ ENV DATA_DIRECTORY_PATH=/api/data
3537
# Set umask to 027
3638
RUN umask 027 && echo "umask 0027" >> /etc/profile
3739

40+
RUN sed -i -e 's/http:/https:/' /etc/apk/repositories
3841
COPY --from=build /var/cache/apk /var/cache/apk
3942
RUN apk add --no-cache bash openssl && rm -rf /var/cache/apk
4043

docker/Dockerfile-mq

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM node:12-alpine3.11 as build
22

33
WORKDIR /tmp
44

5+
RUN sed -i -e 's/http:/https:/' /etc/apk/repositories
6+
57
RUN apk update && apk add --no-cache --virtual .build-deps \
68
python \
79
g++ \
@@ -33,6 +35,7 @@ LABEL maintainer="NDID IT Team <it@ndid.co.th>"
3335
# Set umask to 027
3436
RUN umask 027 && echo "umask 0027" >> /etc/profile
3537

38+
RUN sed -i -e 's/http:/https:/' /etc/apk/repositories
3639
COPY --from=build /var/cache/apk /var/cache/apk
3740
RUN apk add --no-cache bash openssl && rm -rf /var/cache/apk
3841

docker/Dockerfile-telemetry

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM node:12-alpine3.11 as build
22

33
WORKDIR /tmp
44

5+
RUN sed -i -e 's/http:/https:/' /etc/apk/repositories
6+
57
RUN apk update && apk add --no-cache --virtual .build-deps \
68
python \
79
g++ \
@@ -33,6 +35,7 @@ LABEL maintainer="NDID IT Team <it@ndid.co.th>"
3335
# Set umask to 027
3436
RUN umask 027 && echo "umask 0027" >> /etc/profile
3537

38+
RUN sed -i -e 's/http:/https:/' /etc/apk/repositories
3639
COPY --from=build /var/cache/apk /var/cache/apk
3740
RUN apk add --no-cache bash openssl && rm -rf /var/cache/apk
3841

0 commit comments

Comments
 (0)