Intro to Docker - raisercostin/software-wiki GitHub Wiki
Docker is a software that combines tools, standards and conventions to be able to
- contain software
- use container in different environments: cloud, bare metal server, vms
The software is abstracted as:
- executable
- ports
- storage
- environment variables
You can transfer a image via a file <myapp>-<version>.tar
. After you import the container as a image you can start a new container with specific settings/ports via docker run
using the <local/myapp>-<version>
as the image tag.
docker export --output="<myapp>-<version>.tar" <container>
docker import <myapp>-<version>.tar <local/myapp>:<version>
See https://medium.com/the-code-review/docker-run-vs-exec-deep-dive-into-their-differences-19a1041735a3
docker run --name test2 --rm -it <image-id> sh
See https://medium.com/the-code-review/docker-run-vs-exec-deep-dive-into-their-differences-19a1041735a3
docker run --name test2 -it <image-id> sh
docker start test2
docker exec -it test2 sh
- install your registry: a heavy process for just one image export/import
- save containers
- save images - https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-via-repository
- https://github.com/sameersbn/docker-gitlab/blob/master/docs/container_registry.md
- https://about.gitlab.com/2016/05/23/gitlab-container-registry/
- https://blog.docker.com/2013/07/how-to-use-your-own-registry/
docker commit <myContainerId> myContainerSnapshot
docker run -it myContainerSnapshot /bin/bash
docker exec -it -u root <myContainerId> bash
docker run -rm -it <image Id|Tag> /bin/sh