Skip to content

Commit f7e2645

Browse files
committed
chore: standardize dockerfile
1 parent 7c09625 commit f7e2645

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

Dockerfile

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,14 @@ FROM docker.io/library/golang:1.19-alpine as builder
44

55
WORKDIR /src
66

7-
ARG VERSION
8-
ARG GITCOMMIT
9-
ARG BUILDTIME
10-
117
RUN apk add --no-cache --no-progress \
128
ca-certificates \
13-
curl \
14-
git \
15-
openssh \
16-
gcc \
17-
libc-dev
18-
9+
curl
10+
1911
# Download spruce here to eliminate the need for curl in the final image
2012
RUN mkdir -p /go/bin && \
21-
arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
22-
curl -L -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.30.2/spruce-linux-${arch} && \
23-
chmod +x /go/bin/spruce && \
24-
sha1sum /go/bin/spruce
13+
curl -L -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-amd64 && \
14+
chmod +x /go/bin/spruce
2515

2616
COPY . .
2717

@@ -33,18 +23,17 @@ FROM alpine:latest
3323

3424
# Copy over the standard things you'd expect.
3525
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
36-
COPY --from=builder /src/caduceus /
37-
COPY --from=builder /src/.release/docker/entrypoint.sh /
26+
COPY caduceus /
27+
COPY .release/docker/entrypoint.sh /
3828

3929
# Copy over spruce and the spruce template file used to make the actual configuration file.
40-
COPY --from=builder /src/.release/docker/caduceus_spruce.yaml /tmp/caduceus_spruce.yaml
41-
COPY --from=builder /go/bin/spruce /bin/
30+
COPY .release/docker/caduceus_spruce.yaml /tmp/caduceus_spruce.yaml
31+
COPY --from=builder /go/bin/spruce /bin/
4232

4333
# Include compliance details about the container and what it contains.
44-
COPY --from=builder /src/Dockerfile \
45-
/src/NOTICE \
46-
/src/LICENSE \
47-
/src/CHANGELOG.md /
34+
COPY Dockerfile /
35+
COPY NOTICE /
36+
COPY LICENSE /
4837

4938
# Make the location for the configuration file that will be used.
5039
RUN mkdir /etc/caduceus/ \

0 commit comments

Comments
 (0)