diff --git a/Dockerfile b/Dockerfile index c142467f..31da2edd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,20 @@ -## SPDX-FileCopyrightText: 2021 Comcast Cable Communications Management, LLC +## SPDX-FileCopyrightText: 2022 Comcast Cable Communications Management, LLC ## SPDX-License-Identifier: Apache-2.0 FROM docker.io/library/golang:1.19-alpine as builder WORKDIR /src -ARG VERSION -ARG GITCOMMIT -ARG BUILDTIME - RUN apk add --no-cache --no-progress \ ca-certificates \ - make \ - curl \ - git \ - openssh \ - gcc \ - libc-dev + curl # Download spruce here to eliminate the need for curl in the final image RUN mkdir -p /go/bin && \ - arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \ - curl -L -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.30.2/spruce-linux-${arch} && \ - chmod +x /go/bin/spruce && \ - sha1sum /go/bin/spruce + curl -L -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-amd64 && \ + chmod +x /go/bin/spruce COPY . . -RUN make test release - ########################## # Build the final image. ########################## @@ -36,18 +23,17 @@ FROM alpine:latest # Copy over the standard things you'd expect. COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY --from=builder /src/argus / -COPY --from=builder /src/.release/docker/entrypoint.sh / +COPY argus / +COPY .release/docker/entrypoint.sh / # Copy over spruce and the spruce template file used to make the actual configuration file. -COPY --from=builder /src/.release/docker/argus_spruce.yaml /tmp/argus_spruce.yaml -COPY --from=builder /go/bin/spruce /bin/ +COPY .release/docker/argus_spruce.yaml /tmp/argus_spruce.yaml +COPY --from=builder /go/bin/spruce /bin/ # Include compliance details about the container and what it contains. -COPY --from=builder /src/Dockerfile \ - /src/NOTICE \ - /src/LICENSE \ - /src/CHANGELOG.md / +COPY Dockerfile / +COPY NOTICE / +COPY LICENSE / # Make the location for the configuration file that will be used. RUN mkdir /etc/argus/ \