docker-hub-images
docker-hub-images copied to clipboard
missing builders
I miss binary builders from official docker images of packer. As docker, qemu-system-x86_64...
Any update on this? Packer version: v1.3.3 Docker version: 18.09.1 OS version: CentOS Linux release 7.6.1810 (Core)
Tried to perform the following command:
docker run -it --volume "$(pwd)":"$(pwd)" --workdir "$(pwd)" docker.artifactory/hashicorp/packer:light build -var-file=packer-vars.json packer-centos-7-qemu.json
got this error
Build 'qemu' errored: Failed creating Qemu driver: exec: "qemu-system-x86_64": executable file not found in $PATH
Running the FULL one did not help either.
Do i need to pass my PATH somehow to the container?
i was able to fix this by modifying the dockerfile to this:
FROM hashicorp/packer
ENV PACKER_LOG=1
RUN apk add qemu-system-x86_64 libvirt qemu-img
Another flavour that is needed until alpine adds libguestfs
FROM hashicorp/packer:light as builder
LABEL author="Oleg Tarassov"
ENV LANG=en_US.utf8
ENV PACKER_LOG=1
FROM centos:latest
COPY --from=builder bin/packer /bin/packer
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* && \
yum install -y epel-release deltarpm
RUN yum install -y qemu-system-x86 qemu-img libguestfs-tools
ENTRYPOINT ["/bin/packer"]