Getting started with DevOps!
-
Build the image docker build -t imagename:version e.g, docker build -t samshu/microservices:1.0
-
Run the container docker run -p 80:8080 -v "$HOME/.m2":/root/.m2 imagename:version
-
After the first run, you can either just start/stop the container instead of running a new one. docker start <container id/name>
- Start all the services defined in the docker-compose.yml file using docker-compose up
- Stop all the services defined in the docker-compose.yml usng docker-compose stop
- Remove all created containers - docker-compose rm