Scrums.com logomark
SovTech is now Scrums.com! Same company, new name.
SovTech is now Scrums.com!!
Read more here

Create your own CI Docker image for AWS S3 + CloudFront

Learn how to create your own CI Docker image for AWS S3 + CloudFront with Node 11 and Yarn, backed by SOFTWARE DEVELOPMENT SERVICES for seamless deployment.

Scrums.com Team
March 1, 2024
Blog cover image

Create Your Own CI Docker Image

Finding the perfect Docker image to use on your CI can be tough—most stock ones don’t come with all the tools you require, and custom ones with the right tools are created and controlled by people you don’t know. Luckily, creating your own image is easy and can be done in a few minutes—let’s look at how.

  • Load and install Docker Desktop if you haven’t already. Links to the apps can be found on their getting started page.
  • Create a Docker account—you will need this to upload your image to the Docker Hub.
  • Find a suitable starting image—in our case we went with node: 11.9.0-alpine

Note that for now we only need to know the name of the image that we want. The Node image tags can be found on the Node page on Docker Hub.

This image was chosen because it is official, and at the time of writing, Node 11.9.0 was the latest available version of Node. The Alpine Linux variant was chosen because it is lightweight.

Create a file called “Dockerfile” with the following content:

  • In your terminal rundocker build . -t your_docker_user/your_image_name

docker build . -t your_docker_user/your_image_name

Your Docker image should build now. The -t is to tag your image—this is how we will reference it later in our CI. After the image has built, running docker images should show you a list of images, including the base image and the one we just built.

  • Publish the image to Docker Hub by running

docker push your_docker_user/your_image_name

  • Make use of the image in your CI

For example, in Bitbucket Pipelines, set the first line of your bitbucket-pipelines.yml file to image: your_docker_user/your_image_name.

As seen on FOX, Digital journal, NCN, Market Watch, Bezinga and more
Scale Your Development Team
Faster With Scrums.com
Get in touch and let's get started
Book a Demo
Tick
Cost-effective
Tick
Reliable
Tick
Scalable