Difference between revisions of "Process/Docker Workflow"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
Pull and build a docker registry image from the official website. [https://docs.docker.com/registry/deploying/#run-a-local-registry]. | |||
<syntaxhighlight lang="shell"> | <syntaxhighlight lang="shell"> | ||
docker commit -a"KevinTung" -m"This is the testing of PKC Workflow" 36f0da0de458 localhost:5000/mediawiki:1.1 | $ docker run -d -p 5000:5000 --restart=always --name registry registry:2 | ||
docker push localhost:5000/mediawiki:1.1 | </syntaxhighlight> | ||
docker image remove localhost:5000/mediawiki:1.1 | |||
docker pull localhost:5000/mediawiki:1.1 | For the target container to be versioned, commit the container by | ||
<syntaxhighlight lang="shell"> | |||
$ docker commit -a"KevinTung" -m"This is the testing of PKC Workflow" 36f0da0de458 localhost:5000/mediawiki:1.1 | |||
</syntaxhighlight> | |||
Note that the ''localhost:5000'' represents the local registry and the '':1.1'' represents the tag. The naming convention of the tag needs to be documented in a project. | |||
Push to the local registry and then test whether it succeeded. | |||
<syntaxhighlight lang="shell"> | |||
$ docker push localhost:5000/mediawiki:1.1 | |||
$ docker image remove localhost:5000/mediawiki:1.1 | |||
$ docker pull localhost:5000/mediawiki:1.1 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
* Successfully pushed to local registry. | * Successfully pushed to local registry. |
Revision as of 08:45, 25 July 2021
Pull and build a docker registry image from the official website. [1].
$ docker run -d -p 5000:5000 --restart=always --name registry registry:2
For the target container to be versioned, commit the container by
$ docker commit -a"KevinTung" -m"This is the testing of PKC Workflow" 36f0da0de458 localhost:5000/mediawiki:1.1
Note that the localhost:5000 represents the local registry and the :1.1 represents the tag. The naming convention of the tag needs to be documented in a project.
Push to the local registry and then test whether it succeeded.
$ docker push localhost:5000/mediawiki:1.1
$ docker image remove localhost:5000/mediawiki:1.1
$ docker pull localhost:5000/mediawiki:1.1
- Successfully pushed to local registry.
- Push to the xlp0 repo
docker push xlp0/mediawiki:1.1
- Denied: Need access to the xlp0 account. [2]
Todo
- Storage customization
- Deploy as docker-compose