Skip to content

Docker guide

SB-GitHub Public edited this page Jan 24, 2018 · 1 revision
  1. Log in to Amazon: https://softbistro.signin.aws.amazon.com/console.
  2. Go to ECS page and click Get started button. You can select options to configure if you want or just click Cancel.
  3. Create a new repository (name of Amazon repository must be the same as a name of Git repository).
  4. You will see «Successfully created repository» Notification with Docker image name.
  5. If you don’t have AWS installed, install it with following commands:
    • sudo apt install python-pip
    • pip install awscli
  6. Login to SB account: aws configure - - profile softbistro (credentials: https://docs.google.com/document/d/1PUXF0KGQVTCfj9o9PsJcuJtpZ_cFh7a9bc60JciyNI8/edit).
  7. Retrieve the docker login command that you can use to authenticate your Docker client to your registry: aws ecr get-login - -no-include-email - -profile softbistro | bash
  8. Connect to server: ssh developer@sb-docker-srv.km.sftb (password: developer)
  9. Clone your git repository with dockerfile in it: git clone /repository_url.
  10. Build your Docker image: docker build -t image_name . (. - where docker file is located).
  11. After the build completes, tag your image so you can push the image to this repository: docker tag image_name:latest.
  12. Push your Docker image to the newly created AWS repository: docker push image_name.
  13. Run Docker image: docker run -ti image_name or docker run -ti -p5000:5000 image_name (-p vm port : docker image port).

Clone this wiki locally