terraform-aws-couchbase icon indicating copy to clipboard operation
terraform-aws-couchbase copied to clipboard

Unable to build ubuntu-18-docker in ami config

Open tinomen opened this issue 4 years ago • 1 comments

The instructions for building the local docker image work for ubuntu-docker which is a Ubuntu 16 image. The config file has an entry for ubuntu-18-docker but it fails.

https://github.com/gruntwork-io/terraform-aws-couchbase/tree/master/examples/local-mocks

==> ubuntu-18-docker: Starting docker container...
    ubuntu-18-docker: Run command: docker run --privileged -v /sys/fs/cgroup:/sys/fs/cgroup -v /Users/jakemallory/.packer.d/tmp054385387:/packer-files -d -i -t gruntwork/ubuntu-test:18.04 /sbin/init
==> ubuntu-18-docker: Error running container: Docker exited with a non-zero exit status.
==> ubuntu-18-docker: Stderr: docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/sbin/init": stat /sbin/init: no such file or directory: unknown.
==> ubuntu-18-docker:
Build 'ubuntu-18-docker' errored after 2 seconds 513 milliseconds: Error running container: Docker exited with a non-zero exit status.
Stderr: docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/sbin/init": stat /sbin/init: no such file or directory: unknown.

The run command is defined the exact same as the v16 based image but doesn't like the "/sbin/init" run command.

Swapping the run command to /bin/bash gets it past that error but then fails with following message:

sudo: systemctl: command not found

tinomen avatar Jan 13 '21 18:01 tinomen

Ah, bummer, we had to disable testing the Docker images in CI due to CircleCI stability issues... Looks like this issue snuck through as a result. If anyone has time to dig in and submit a PR, we'd be grateful!

brikis98 avatar Jan 14 '21 10:01 brikis98

This repo is being archived, feel free to use a fork if necessary.

ellisonc avatar Mar 29 '23 18:03 ellisonc