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
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 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
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
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
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
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
Categorised as amazon-ami, docker, packer Tagged , ,

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

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