Dockerfile 507 B

1234567891011121314151617181920
  1. FROM alpine as runner
  2. ARG NAME
  3. ARG ENVIRONMENT
  4. ARG TZ
  5. ENV NAME=${NAME}
  6. ENV ENVIRONMENT=${ENVIRONMENT}
  7. ENV TZ=${TZ}
  8. # COPY /etc/ssl/certs/ca-bundle.pem /etc/ssl/cert.pem
  9. COPY . .
  10. RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
  11. RUN apk add tzdata
  12. RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime
  13. RUN echo "${TZ}" > /etc/timezone
  14. RUN chmod 755 ${NAME}
  15. # COPY /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert
  16. ENTRYPOINT ["sh", "-c", "./$NAME -f etc/$NAME.$ENVIRONMENT.toml"]