From 967169d8c4fbbabf13aec3074558cdaee5452a18 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 21 Jul 2023 11:39:25 -0400 Subject: [PATCH] Dockerfile: add release-full target In addition to the `release-light' target, we add a `release_full' target to the Dockerfile, so that we can ship an image of Packer with the official plugins pre-bundled in their latest version. --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5724076b4..d50c96ebc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,6 +104,24 @@ COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/ ENTRYPOINT ["/bin/packer"] +# Full docker image which can be used to run the binary from a container. +# This image is essentially the same as the `release-light` one, but embeds +# the official plugins in it. +FROM release-light as release-full + +# Install the latest version of the official plugins +RUN /bin/packer plugins install "github.com/hashicorp/amazon" && \ + /bin/packer plugins install "github.com/hashicorp/ansible" && \ + /bin/packer plugins install "github.com/hashicorp/azure" && \ + /bin/packer plugins install "github.com/hashicorp/docker" && \ + /bin/packer plugins install "github.com/hashicorp/googlecompute" && \ + /bin/packer plugins install "github.com/hashicorp/qemu" && \ + /bin/packer plugins install "github.com/hashicorp/vagrant" && \ + /bin/packer plugins install "github.com/hashicorp/virtualbox" && \ + /bin/packer plugins install "github.com/hashicorp/vmware" && \ + /bin/packer plugins install "github.com/hashicorp/vsphere" + +ENTRYPOINT ["/bin/packer"] # Set default target to 'dev'. FROM dev