diff --git a/Dockerfile b/Dockerfile index 84732ae..86170f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,12 @@ RUN go get github.com/aelsabbahy/goss/cmd/goss@v${GOSS_VER} && \ strip ${GOPATH}/bin/* && \ go clean -cache -modcache -# Build goss, packer, and packer-provisioner-goss with musl +# Build goss and packer-provisioner-goss with musl FROM golang:1.13-alpine3.10 as build_musl_bins -ARG PACKER_VER=1.5.4 ARG PACKER_PROVISIONER_GOSS_VER=1.0.0 ARG GOSS_VER=0.3.10 ENV GO111MODULE=on RUN apk --no-cache --upgrade --virtual=build_environment add binutils && \ - go get github.com/hashicorp/packer@v${PACKER_VER} && \ go get github.com/YaleUniversity/packer-provisioner-goss@v${PACKER_PROVISIONER_GOSS_VER} && \ go get github.com/aelsabbahy/goss/cmd/goss@v${GOSS_VER} && \ strip $GOPATH/bin/* && \ @@ -29,12 +27,16 @@ LABEL maintainer="Dominik L. Borkowski" # Get binaries from musl based container COPY --from=build_musl_bins \ - /go/bin/packer /go/bin/goss /go/bin/packer-provisioner-goss /bin/ + /go/bin/goss /go/bin/packer-provisioner-goss /bin/ # Get binaries from glibc based container COPY --from=build_glibc_bins \ /go/bin/goss /bin/goss-glibc +# Get packer binaries from their official container +ARG PACKER_VER=1.5.4 +COPY --from=hashicorp/packer:${PACKER_VER} /bin/packer /bin/packer + # Install few essential tools and AWS CLI, then clean up RUN apk --no-cache --upgrade --virtual=build_environment add \ gcc python3-dev musl-dev libffi-dev openssl-dev && \