Difference between revisions of "Process/Docker Workflow"
Jump to navigation
Jump to search
m (KevinTung moved page Job/Docker Workflow/Process to Process/Docker Workflow) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
</onlyinclude> | </onlyinclude> | ||
Pull and build a docker registry image from the official website. [https://docs.docker.com/registry/deploying/#run-a-local-registry]. | Pull and build a docker registry image from the official website<ref>https://docs.docker.com/registry/deploying/</ref>. [https://docs.docker.com/registry/deploying/#run-a-local-registry]. | ||
<syntaxhighlight lang="shell"> | <syntaxhighlight lang="shell"> | ||
$ docker run -d -p 5000:5000 --restart=always --name registry registry:2 | $ docker run -d -p 5000:5000 --restart=always --name registry registry:2 | ||
Line 26: | Line 26: | ||
* Successfully pushed to local registry. | * Successfully pushed to local registry. | ||
* Push to the | * Push to the asd135441 repo | ||
<syntaxhighlight lang="shell"> | <syntaxhighlight lang="shell"> | ||
$ docker push | $ docker push asd135441/mediawiki:1.1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Denied: Need access to the xlp0 account. [https://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied-docker] | * Denied: Need access to the xlp0 account. [https://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied-docker] | ||
* Need to log in first | |||
<syntaxhighlight lang="shell"> | |||
$ docker login | |||
$ docker push asd135441/mediawiki:1.1 | |||
... | |||
ae6764c3bbf3: Mounted from xlp0/mediawiki | |||
... | |||
</syntaxhighlight> | |||
* Notice the "Mount from repo". This indicates that the specified layers you want to push to that repository do not exist in that repository, but they do exist in another repository on the same registry server which you have read access. Instead of transferring the layers over the network, docker shares the layers between the repositories. | |||
== Todo == | == Todo == | ||
Line 38: | Line 50: | ||
* [https://docs.docker.com/registry/deploying/#deploy-your-registry-using-a-compose-file Deploy as docker-compose] | * [https://docs.docker.com/registry/deploying/#deploy-your-registry-using-a-compose-file Deploy as docker-compose] | ||
* To put all the required extensions in Localsettings and make a software version from it. | * To put all the required extensions in Localsettings and make a software version from it. | ||
=References= | |||
<references/> |
Latest revision as of 13:21, 28 August 2021
Summary
- Pull and build a docker registry image from the official website. [1].
- For the target container to be versioned, commit the container.
- Push to the local registry and then test whether it succeeded.
- Install some extensions and make a software version from it.
Pull and build a docker registry image from the official website[1]. [2].
$ 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 asd135441 repo
$ docker push asd135441/mediawiki:1.1
- Denied: Need access to the xlp0 account. [3]
- Need to log in first
$ docker login
$ docker push asd135441/mediawiki:1.1
...
ae6764c3bbf3: Mounted from xlp0/mediawiki
...
- Notice the "Mount from repo". This indicates that the specified layers you want to push to that repository do not exist in that repository, but they do exist in another repository on the same registry server which you have read access. Instead of transferring the layers over the network, docker shares the layers between the repositories.
Todo
- Storage customization
- Deploy as docker-compose
- To put all the required extensions in Localsettings and make a software version from it.