See Configuring your machine for the demo: Docker Demo
You make a image with docker compose You create a container running that image You compose a service
example: REPOSITORY TAG IMAGE ID CREATED SIZE quickstartidentityserver dev 17477555f987 11 minutes ago 509MB
Getting info : docker image inspect 17
download the public image like this : docker pull microsoft/mssql-server-windows-express run an instance like this ( password must be complex enough, otherwise login will fail, no other warning!) docker run --name demodb -d -p 1433:1433 -e sa_password=azurePASSWORD123 -e ACCEPT_EULA=Y microsoft/mssql-server-windows-express connect to the instance like this docker exec -it <DOCKER_CONTAINER_ID> sqlcmd or connect from SSMS: figure out ipaddress docker inspect –format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" <DOCKER_CONTAINER_ID>
use it in SSMS
docker docker container --help
docker --version docker version docker info
docker run hello-world
docker image ls
docker image rm [container-id]
docker container ls docker container ls --all docker container ls -aq
docker swarm init docker stack deploy -c docker-compose.yml getstarted docker stack rm getstarted // stop the service
docker swarm leave --force // take down the swarm
If you change the docker.compose.yml file and save, you can run the deploy command again, docker will handle the changes like start up more replica's if requested.
docker service ls docker service ps getstartedlab_web // Send ps command to linux host
docker ps --filter "status=running" --filter "name=demodb" --format {{.ID}} -n 1 docker inspect --format="{{.NetworkSettings.Networks.nat.IPAddress}}" d5d
WORKDIR ADD RUN EXPOSE CMD
FROM python:2.7-slim
WORKDIR /app
ADD . /app
RUN pip install --trusted-host pypi.python.org -r requirements.txt
EXPOSE 80
ENV NAME World
CMD ["python", "app.py"]
version: "3" services: web: # replace username/repo:tag with your name and image details image: username/repo:tag deploy: replicas: 5 resources: limits: cpus: "0.1" memory: 50M restart_policy: condition: on-failure ports: - "80:80" networks: - webnet
networks: webnet: