Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

missing builders #9

Open
oneingan opened this issue Jun 30, 2016 · 2 comments
Open

missing builders #9

oneingan opened this issue Jun 30, 2016 · 2 comments

Comments

@oneingan
Copy link

I miss binary builders from official docker images of packer.
As docker, qemu-system-x86_64...

@olegTarassov
Copy link

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?

@olegTarassov
Copy link

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"]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants