Docker for Voice
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
- https://www.docker.com/
- Sign Up
- Sign up for a Docker account.
Setup Docker CLI
docker login- enter your email & password. You’ll now be signed in.
Pull Docker Images
- `docker pull crazzywizard/voice_essentials_image:latest`
don’t have read access? Try creating your own Docker image.
Create Docker Image
- `cd <working-directory>`
- `touch Dockerfile`
- Open
Dockerfilein your favorite code editor (we use VS Code). - Add your Docker commands to this file. (see example below).
- Save your changes.
docker build .
Build your Docker Image
cd <working-directory-with-Dockerfile>- `docker build .`
docker images(this will print all of your local Docker images).
Tag your Docker Image
docker images(copy image ID of your newly built Docker image).docker tag <image id> <docker-user-id>/<docker-repo-name>:<tag>- example: `docker tag 16436a5b2e7d crazzywizard/voice_essentials_image:gactions`
- run
docker imagesagain to see the name of your newly built image has been updated.
Get Voice First 🎃’s stories in your inbox
Join Medium for free to get updates from this writer.
Push your Image to Docker Hub
- `docker push <repo>:<tag>`
- example: `docker push crazzywizard/voice_essentials_image:gactions`
Hope this helps!
Example Dockerfile.
This `Dockerfile` contains:
- ASK CLI
- 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" ]








