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


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Docker in Docker with Node, for CodeBuild

An unofficial Dockerfile for CodeBuild, combining the official Docker (in Docker) and Node environments.

Based on AWS' Docker 17.09 and Node 6.3.1 Dockerfiles.

For more information see the official repo.

Using in CodeBuild

To use this Dockerfile in your build, create a new CodeBuild project, or update an existing one. Then:

  • In the Environment: How to build section, select Specify a Docker image
  • Choose Linux as your Environment type
  • Choose Other for Custom image type
  • For the Custom image ID, enter tdmalone/codebuild-docker-node
  • Select the Privileged checkbox

This will run your build with this image, which is built from this current repo.

Then, in your buildspec.yml, somewhere before you run or build a Docker image, make sure you execute this:

nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp:// --storage-driver=overlay&
timeout 15 sh -c "until docker info; do echo .; sleep 1; done"

(This comes from this AWS CodeBuild sample).

Running locally

If you want to run without having to build it:

docker run --interactive --privileged --tty tdmalone/codebuild-docker-node bash

That will download and start a container with the pre-built image, running the bash shell.

Otherwise, to build it yourself:

  • Run git clone to download this repository to your local machine.
  • Change to the directory you cloned into, eg. cd codebuild-docker-node.
  • Run docker build --tag codebuild-docker-node . to build the Docker image locally.
  • Once succeeded, you can then run docker run --interactive --privileged --tty codebuild-docker-node bash to start the container in a bash shell.

You can see the docker build and docker run references for more.

Changes from the originals

Based on CodeBuild's Docker 17.09 file, this repo:

  • removes the Python installation
  • removes the installation of libmysqlclient-dev=5.5.58-* due to error E: Version '5.5.58-*' for 'libmysqlclient-dev' was not found
  • adds the Node 6.3.1 installation




An unofficial Dockerfile for CodeBuild combining official Docker (in Docker) and Node environments.








No packages published