Docker Pills
[Docker
]
Docker
Hola, nuevamente un recordatorio rápido de comandos docker para la lucha con contenedores.
Show Containers:
docker container ls
Execute Commands:
docker container exec [containerId or containerName] [command]
Console on Container:
docker container exec -it [containerId or containerName] /bin/bash
Run Containers:
docker container run [containerName] :[imageVersion]
docker container run -p [hostPort]:[containerPort][containerName]:[imageVersion]
Background Run:
docker container run --detach -p [hostPort]:[containerPort][containerName]:[imageVersion]
Copiar archivos :
docker container cp [file] elegant_noether:[path]
Ejecutar DockerFile:
docker image build --tag [containerName]:[setNumVersion] .
Volumen:
docker run -d -p [hostPort]:[containerPort] -v /[myVolumeName] :[patFolderOnContainerHost] [containerName]:[imageVersion]
DockerFile FROM [imageName:imageVersion]
EXPOSE [port]
RUN [shellCommand]
COPY [file] [toPath]
LABEL [KeyPairValuem{maintainer=\"moby-dock@example.com\"}]
Saludos.