Questions tagged packer

Explore the latest questions and answers asked by our top developers.

Packer Errors on Attempt to Run A Script

I have a Packer build that is using GitHub actions. The build needs to run a bash script that dockerizes the applications. I know it’s not best practice, but I have to ensure that the script can be used during the Packer build. I get the following error: Error: /15 04:59:23 packer-plugin-amazon_v1.0.6_x5.0_linux_amd64 plugin: 2022/01/15 04:59:23 […]

By R Barrett
Published
Categorised as docker, packer Tagged ,

cannot get vagrant to launch packer generated docker image/box

I’m attempting to build a docker image from packer, and launch it with vagrant. Using the hcl below I: packer build aws-amzn2.pkr.hcl vagrant box add –name amzn2 packer_amzn2_docker.box vagrant init amzn2 vagrant up which fails with: vagrant up Bringing machine ‘default’ up with ‘docker’ provider… ==> default: Creating and configuring docker networks… ==> default: Vagrant […]

By jsharpe
Published
Categorised as docker, packer, vagrant Tagged , ,

Building a docker container via packer and provisioning via chef-solo fails on starting a service

the following is an excerpt of a much bigger image factory template that builds a centos:7 docker image. everything works as expected however i get a dbus error on the running container. any help is appreciated! this same code works if: i use vmware-iso or virtualbox builders. i use a centos:6 image what i have […]

By jonypony3
Published
Categorised as centos, chef-infra, docker, packer, redhat Tagged , , , ,

Packer Docker builder with nginx as base image

Expecting Here is my packer file: { "builders" : [ { "type": "docker", "image": "nginx", "commit": "true" } ], "provisioners" : [ { "type": "file", "source": "./index.html", "destination": "/usr/share/nginx/html/index.html" } ], "post-processors" : [ { "type": "docker-tag", "repository": "repo", "tag": "latest" } ] } After packer build for above file when running the docker container […]

By user3007981
Published
Categorised as docker, nginx, packer Tagged , ,

Packer Github Actions: no such file or directory

I am trying to run packer file on a specific sub-directory (packer/beta): – name: packer run: | ls -la && echo "starting docker" && docker run hashicorp/packer build -debug packer.json working-directory: ‘packer/beta’ I can see the file packer.json when I do ls -la. I got the same error with this version: – name: packer uses: […]

By soltex
Published
Categorised as docker, github-actions, packer Tagged , ,

Is there a way to command Docker to start containers to start on next boot instead of now?

I am using Packer to build an EC2 AMI containing Docker images. I want a few services (restart policy set to unless-stopped to be downloaded and ready to run on first boot without actually running during build time. At the moment I docker-compose up -d, wait an arbitrary amount of time, then finish the packer […]

By Dean Kayton
Published
Categorised as amazon-ami, docker, packer Tagged , ,

How can I use Hashicorp Packer to creat EC2 image that runs docker image on startup?

I am trying to build an Amazon AMI that contains docker running as a daemon, runs a particular image with a mounted volume from the host, and installs some software and data inside the docker image (which will land in the mounted volume). I’d like the resulting AMI to run the same docker image on […]

By seandavi
Published
Categorised as amazon-ec2, amazon-web-services, docker, packer

How are Packer and Docker different? Which one should I prefer when provisioning images?

How are Packer and Docker different? Which one is easier/quickest to provision/maintain and why? What is the pros and cons of having a dockerfile? Source: Dockerfile Questions

How are docker and packer different? And which one should I prefer when provisioning images?

How is packer and docker different? Which one is easier/quickest to provision/maintain and why? What is the pros and cons of having a docker file? Source: Dockerfile Questions

By Abhineetraj
Published
Categorised as docker, docker-compose, dockerfile, packer

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq