GitOps for k8s
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile.flux 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM alpine:3.6
  2. # These are pretty static
  3. LABEL maintainer="Weaveworks <help@weave.works>" \
  4. org.opencontainers.image.title="flux" \
  5. org.opencontainers.image.description="The Flux daemon, for synchronising your cluster with a git repo, and deploying new images" \
  6. org.opencontainers.image.url="https://github.com/weaveworks/flux" \
  7. org.opencontainers.image.source="git@github.com:weaveworks/flux" \
  8. org.opencontainers.image.vendor="Weaveworks" \
  9. org.label-schema.schema-version="1.0" \
  10. org.label-schema.name="flux" \
  11. org.label-schema.description="The Flux daemon, for synchronising your cluster with a git repo, and deploying new images" \
  12. org.label-schema.url="https://github.com/weaveworks/flux" \
  13. org.label-schema.vcs-url="git@github.com:weaveworks/flux" \
  14. org.label-schema.vendor="Weaveworks"
  15. WORKDIR /home/flux
  16. ENTRYPOINT [ "/sbin/tini", "--", "fluxd" ]
  17. RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0'
  18. # Get the kubeyaml binary (files) and put them on the path
  19. COPY --from=quay.io/squaremo/kubeyaml:0.2.1 /usr/lib/kubeyaml /usr/lib/kubeyaml/
  20. ENV PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/kubeyaml
  21. # Add git hosts to known hosts file so when git ssh's using the deploy
  22. # key we don't get an unknown host warning.
  23. RUN mkdir ~/.ssh && touch ~/.ssh/known_hosts && \
  24. ssh-keyscan github.com gitlab.com bitbucket.org >> ~/.ssh/known_hosts && \
  25. chmod 600 ~/.ssh/known_hosts
  26. # Add default SSH config, which points at the private key we'll mount
  27. COPY ./ssh_config /root/.ssh/config
  28. RUN chmod 600 /root/.ssh/config
  29. COPY ./kubeconfig /root/.kube/config
  30. COPY ./kubectl /usr/local/bin/
  31. COPY ./fluxd /usr/local/bin/
  32. ARG BUILD_DATE
  33. ARG VCS_REF
  34. # These will change for every build
  35. LABEL org.opencontainers.image.revision="$VCS_REF" \
  36. org.opencontainers.image.created="$BUILD_DATE" \
  37. org.label-schema.vcs-ref="$VCS_REF" \
  38. org.label-schema.build-date="$BUILD_DATE"