Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 1.87 KB

File metadata and controls

39 lines (33 loc) · 1.87 KB

Documentation

This document contains information on how to build and upload the docker image.

1) Installing the tools

  • 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_PATH with value D:\Docker\machine for example
  • 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:\Www to d/Wwww with the automatic mounting
    • Close Virtualbox

2) Build the docker image

  • Clone the repository git@github.com:klipperdev/docker-builder.git with 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