Containers, Dockers and Spring Boot walk-through

Introduction to Basic docker Commands:

docker run - Image -- creates a container from an image. If you run this many times you create many containers from the same image docker start name |id - Starts an existing container that is not running docker stop name|id docker ps ( -a include stopped containers) docker rm name|id --Remove a container docker rmi imageName-- Remove docker image docker run -it ubuntu when -i -t is added, it gives an interactive shell access into the container. Without this the container runs and exits! To get started create and account here: https://hub.docker.com/ Making a new image from the original image docker run -it ubuntu -- If the image is not available docker will pull from hub.docker.com sudo apt-get install nodejs example: docker commit -m "added node.js" -a "Chris Kibuchi" 96ac46a4d14f ckeidev/ubuntu-nodejs -m for Message -a for Author Login to Dockerhub on terminal: docker login -u ckeidev docker hub username/password docker push ckeidev/ubuntu-nodejs ====Spring Boot==== https://spring.io/guides/gs/spring-bo... docker run -e "SPRING_PROFILES_ACTIVE=dev" -p 8080:8080 -t ckeidev/gs-rest-service this will launch the docker with spring boot and -p maps a port on docker to the host machine port -p hostport/dockerport

Comments

Popular posts from this blog

Arduino Temperature sensor and LCD Display

Importing a dump file in Oracle 12C

Arduino UNO Sound Sensor