scratch.Dockerfile 965 B

12345678910111213141516171819202122232425262728293031323334
  1. ##### BUILDER #####
  2. # there is no need to build everything again. we already have the alpine based image and can use its atifacts
  3. ##### TARGET #####
  4. ARG RELEASE
  5. FROM gomicro:alpine-${RELEASE} AS copy-src
  6. FROM scratch
  7. ARG RELEASE
  8. ENV IMG_VERSION="${RELEASE}"
  9. # hadolint ignore=DL3022
  10. COPY --from=copy-src /usr/local/bin/gomicro /
  11. # hadolint ignore=DL3022
  12. COPY --from=copy-src /config/service.yaml /config/
  13. ENTRYPOINT ["/gomicro"]
  14. CMD ["--config","/config/service.yaml"]
  15. EXPOSE 8080 8443
  16. LABEL org.opencontainers.image.title="GoMicro" \
  17. org.opencontainers.image.description="DM GoMicro" \
  18. org.opencontainers.image.version="${IMG_VERSION}" \
  19. org.opencontainers.image.source="https://bitbucket.easy.de/scm/dm/service-gomicro-go.git" \
  20. org.opencontainers.image.vendor="EASY SOFTWARE AG (www.easy-software.com)" \
  21. org.opencontainers.image.authors="EASY Apiomat GmbH" \
  22. maintainer="EASY Apiomat GmbH" \
  23. NAME="gomicro"