documentation
This commit is contained in:
55
README.md
55
README.md
@@ -2,6 +2,12 @@
|
||||
|
||||
## Setup
|
||||
|
||||
``` bash
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
docker run hello-world
|
||||
```
|
||||
|
||||
### Alphine
|
||||
source https://wiki.alpinelinux.org/wiki/Docker
|
||||
|
||||
@@ -10,12 +16,61 @@ apk add docker
|
||||
addgroup username docker
|
||||
rc-update add docker default
|
||||
service docker start
|
||||
```
|
||||
### fuse overlay
|
||||
|
||||
```bash
|
||||
apt install --yes fuse-overlayfs
|
||||
```
|
||||
|
||||
## Containers
|
||||
|
||||
### Containers list
|
||||
|
||||
```bash
|
||||
docker container list
|
||||
```
|
||||
|
||||
|
||||
### Interactive shell
|
||||
|
||||
```bash
|
||||
#example with ubuntu
|
||||
docker container run -it ubuntu /bin/bash
|
||||
```
|
||||
### Remove when finished
|
||||
|
||||
```bash
|
||||
#example with ubuntu
|
||||
docker container run -rm ubuntu
|
||||
```
|
||||
### Attach to a running container
|
||||
|
||||
```bash
|
||||
#attach to stdout of container with name ubuntu
|
||||
docker container run -a ubuntu
|
||||
## connects to container with name ubuntu and attach to bash (interactive)
|
||||
docker exec -it pm_wp_adminer /bin/bash
|
||||
```
|
||||
|
||||
## Volumes
|
||||
|
||||
### Export / Backup
|
||||
|
||||
```bash
|
||||
#export volumes (tar) from dbstore container into volume
|
||||
docker run --rm --volumes-from dbstore -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /dbdata
|
||||
```
|
||||
|
||||
|
||||
### Import / Restores
|
||||
|
||||
```bash
|
||||
#inports volumes (untar) into dbstore2
|
||||
docker run --rm --volumes-from dbstore2 -v $(pwd):/backup ubuntu bash -c "cd /dbdata && tar xvf /backup/backup.tar --strip 1"
|
||||
```
|
||||
|
||||
|
||||
### NFS
|
||||
|
||||
Notes:
|
||||
|
||||
Reference in New Issue
Block a user