Each virtual machine includes the application, the necessary binaries and libraries and an entire guest operating system - all of which may be tens of GBs in size.
Containers include the application and all of its dependencies, but share the kernel with other containers. They run as an isolated process in userspace on the host operating system. They’re also not tied to any specific infrastructure – Docker containers run on any computer, on any infrastructure and in any cloud.
FROM ubuntu:14.04
MAINTAINER Adam Engebretson <[email protected]>
RUN apt-get upgrade && apt-get update
# Install your application here
EXPOSE 80
VOLUME /var/www
sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
gitlab:
hostname: gitlab.example.com
ports:
- "443:443"
- "80:80"
- "22:22"
restart: always
volumes:
- "/srv/gitlab/config:/etc/gitlab"
- "/srv/gitlab/logs:/var/log/gitlab"
- "/srv/gitlab/data:/var/opt/gitlab"
image: gitlab/gitlab-ce:latest
docker-compose start
- Resource Management
- Container Networking
- Service Discovery
- Container Load Balancing
- Health Checks & Recovery
- Upgrade
- Store Management