Skip to content

Commit

Permalink
Fix up AMD64 dockerfile.
Browse files Browse the repository at this point in the history
- Add missing PATH.
- Bring into sync with other arches.
  • Loading branch information
fasaxc committed Apr 23, 2018
1 parent 7a1d2b6 commit 182918d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docker-image/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM amd64/alpine:3.7
FROM alpine:3.6 as base
MAINTAINER Shaun Crampton <[email protected]>

# Since our binary isn't designed to run as PID 1, run it via the tini init daemon.
RUN apk add --update tini
ENTRYPOINT ["/sbin/tini", "--"]

ADD typha.cfg /etc/calico/typha.cfg
FROM scratch
COPY --from=base /sbin/tini /sbin/tini
COPY --from=base /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=base /lib/libc.musl-x86_64.so.1 /lib/libc.musl-x86_64.so.1

# Put out binary in /code rather than directly in /usr/bin. This allows the downstream builds
# Put our binary in /code rather than directly in /usr/bin. This allows the downstream builds
# to more easily extract the build artefacts from the container.
RUN mkdir /code
ADD bin/calico-typha-amd64 /code/calico-typha
ADD typha.cfg /etc/calico/typha.cfg

WORKDIR /code
ENV PATH="$PATH:/code"

# Run Typha by default
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["calico-typha"]

0 comments on commit 182918d

Please sign in to comment.