This document contains information on how to build and upload the docker image.
- Install Git
- Install Amazon AWS CLI
- Install Docker Toolbox
- If you want to move the image of virtual machine:
- Add the environment variable
MACHINE_STORAGE_PATHwith valueD:\Docker\machinefor example
- Add the environment variable
- If your workspace isn't in the path
C:\Users:- Launch the Docker Quickstart Terminal for the first initialization
- Close the terminal and shutdown the VM in Virtualbox
- In Virtualbox, add the shared folder:
D:\Wwwtod/Wwwwwith the automatic mounting
- Close Virtualbox
- Clone the repository
git@github.com:klipperdev/docker-builder.gitwith Git - Launch the Docker Quickstart Terminal
- Move the working directory in the folder of this repository (ex.
cd /d/Git/docker/klipper/docker-builder) - Create the docker image *:
docker build -t <ecr-repository> .
- Get the docker login for the Amazon AWS ECR *:
aws ecr get-login --no-include-email --region <ecr-region>
- Run the docker login command that was returned in the previous step *
- Tag the docker image *:
docker tag <ecr-repository>:latest <ecr-repository-uri>:latest
- Push the docker image in the Amazon AWS ECR *:
docker push <ecr-repository-uri>:latest
Notes:
- * All commands are listed in the selected ECR repository of the Amazon AWS Console (button
Display push commands)<ecr-region>must be replaced by the name of the selected region of ECR repository (defined in the URI of the ECR repository)<ecr-repository>must be replaced by the name of the selected ECR repository<ecr-repository-uri>must be replaced by the URI of the selected ECR repository