Skip to content

Dockerize Photosite application

AmiBhadani edited this page Mar 2, 2021 · 4 revisions

Steps to create Docker container.

  • Once the Docker is installed and running successfully, create a docker file.
  • A Dockerfile is a way to describe a docker image that contains all the commands that is required to install the programs and libraries.
  • Dockerfile creates a basic image, and it contains commands to install all the dependencies required to run the application successfully.
  • After creating Dockerfile, build docker image using command: docker build -t photosite-app.

docker command

  • Run docker image and give name to docker container using command: docker run -it -p 3000:3000 --name photosite-container photosite-app

docke run

  • Push this container to docker hub

    • Create an account on docker hub.

    • Make repository in docker hub(here my repository name is photosite)

      • docker repo
    • Log in to docker using command: docker login

      • docker login
    • Now push docker container to docker hub repository using command: docker push abhadani/photosite

      • docker push
  • After container is successfully pushed to docker repository, image will be publicly available under your repository.

    • docker repo list
  • Users can pull the Photosite rail applications image to their computer and can run that application.

Clone this wiki locally