We use docker images in out Github (and Gitlab) CI/CD deployments. Here’s the commands we use to create, build, deploy, and use Docker images.

Setup Docker Account

  1. https://www.docker.com/
  2. Sign Up
  3. Sign up for a Docker account.

Setup Docker CLI

  1. docker login
  2. enter your email & password. You’ll now be signed in.

Pull Docker Images

  1. `docker pull crazzywizard/voice_essentials_image:latest`

Create Docker Image

  1. `cd <working-directory>`
  2. `touch Dockerfile`
  3. Open Dockerfile in your favorite code editor (we use VS Code).
  4. Add your Docker commands to this file. (see example below).
  5. Save your changes.
  6. docker build .

Build your Docker Image

  1. cd <working-directory-with-Dockerfile>
  2. `docker build .`
  3. docker images (this will print all of your local Docker images).
  1. docker tag <image id> <docker-user-id>/<docker-repo-name>:<tag>
  2. example: `docker tag 16436a5b2e7d crazzywizard/voice_essentials_image:gactions`
  3. run docker images again to see the name of your newly built image has been updated.

Push your Image to Docker Hub

  1. `docker push <repo>:<tag>`
  2. example: `docker push crazzywizard/voice_essentials_image:gactions`

Example Dockerfile.

This `Dockerfile` contains:

  • AWS CLI
  • Google Cloud CLI
  • Gactions CLI
FROM nikolaik/python-nodejs:python3.9-nodejs14MAINTAINER sameer crazzywizard@gmail.com & sweets patrick@voicefirsttech.comRUN npm i -g jovo-cli && npm install --quiet --no-progress --unsafe-perm -g ask-cli@latest && pip install --upgrade awscliRUN curl -sSL https://sdk.cloud.google.com | bash#Adding the package path to localENV PATH $PATH:/root/google-cloud-sdk/# GACTIONSRUN mkdir /workdirVOLUME /workdirRUN curl https://dl.google.com/gactions/updates/bin/linux/amd64/gactions/gactions -o /gactions && chmod u+x /gactionsWORKDIR /workdirENTRYPOINT [ "/gactions" ]

👻 VOICE SOFTWARE CO. 👻 // #Columbus // less thumb-swiping & screen-facing. Wholistic Balance ☯️ of Midwestern Love ❤️ + Artificial Intelligence 💬