Docker: Difference between revisions
No edit summary |
mNo edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Copy files to/from container | Copy files to/from container | ||
< | <syntaxhighlight lang="console"> | ||
$ docker cp myfile.txt container_name:/srv/www/folder/ | $ docker cp myfile.txt container_name:/srv/www/folder/ | ||
</ | </syntaxhighlight> | ||
List images | List images | ||
< | <syntaxhighlight lang="bash"> | ||
$ docker images | $ docker images | ||
</ | </syntaxhighlight> | ||
Tag an image | Tag an image | ||
< | <syntaxhighlight lang="bash"> | ||
$ docker tag 7d9495d03763 maryatdocker/docker-whale:latest | $ docker tag 7d9495d03763 maryatdocker/docker-whale:latest | ||
</ | </syntaxhighlight> | ||
Log-in for push/pull operations | Log-in for push/pull operations | ||
< | <syntaxhighlight lang="bash"> | ||
$ docker login --username=username --email=joe@mosh.com | $ docker login --username=username --email=joe@mosh.com | ||
</ | </syntaxhighlight> | ||
Push image | Push image | ||
< | <syntaxhighlight lang="bash"> | ||
$ docker push maryatdocker/docker-whale | $ docker push maryatdocker/docker-whale | ||
</ | </syntaxhighlight> | ||
Remove an image | Remove an image | ||
< | <syntaxhighlight lang="bash"> | ||
$ docker rmi -f imageid | $ docker rmi -f imageid | ||
</ | </syntaxhighlight> | ||
== Resources == | |||
* [https://medium.com/@brentrobinson5/containerised-ci-cd-pipelines-with-azure-devops-74064c679f20 Containerised CI/CD pipelines with Azure DevOps | by Brent Robinson | Medium] | |||
*VS Code | |||
**[https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers Dev Containers plugin for VS Code] | |||
**[https://semaphoreci.com/community/tutorials/dockerizing-a-php-application Dockerizing a PHP Application] | |||
**[https://docs.docker.com/get-started/02_our_app/ Containerize an application] | |||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:Container]] | |||
[[Category:Docker]] |
Latest revision as of 07:49, 31 August 2023
Copy files to/from container
$ docker cp myfile.txt container_name:/srv/www/folder/
List images
$ docker images
Tag an image
$ docker tag 7d9495d03763 maryatdocker/docker-whale:latest
Log-in for push/pull operations
$ docker login --username=username --email=joe@mosh.com
Push image
$ docker push maryatdocker/docker-whale
Remove an image
$ docker rmi -f imageid