Merge ~sylvain-pineau/plainbox-provider-docker:fix-registry into plainbox-provider-docker:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 3800a3fc6225dd20868df643bce04fba316e9c87
Merged at revision: b6546533013172b5be40d7cd163885a91e689f1c
Proposed branch: ~sylvain-pineau/plainbox-provider-docker:fix-registry
Merge into: plainbox-provider-docker:master
Diff against target: 22 lines (+4/-2)
1 file modified
units/docker.pxu (+4/-2)
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+386499@code.launchpad.net

Description of the change

Requires: https://code.launchpad.net/~sylvain-pineau/checkbox-core-snap/+git/checkbox-core-snap/+merge/386498

Fix the docker/deploy-registry job by calling htpasswd outside the container.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Let's land it, I wanna see if edge builds are fixed with this patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/docker.pxu b/units/docker.pxu
2index e66001c..45acc16 100644
3--- a/units/docker.pxu
4+++ b/units/docker.pxu
5@@ -318,13 +318,15 @@ template-unit: job
6 id: docker/deploy-registry_{arch}
7 user: root
8 category_id: docker
9-requires: snap.name == 'docker'
10+requires:
11+ snap.name == 'docker'
12+ executable.name == 'htpasswd'
13 command:
14 set -e
15 #A readable&writable path for docker snap
16 auth_folder=/var/snap/docker/common/auth
17 mkdir -p $auth_folder
18- docker run --entrypoint htpasswd registry:2 -Bbn user passwd > $auth_folder/htpasswd
19+ htpasswd -Bbn user passwd > $auth_folder/htpasswd
20 docker run -d -p 5000:5000 --restart=always --name registry \
21 -v $auth_folder:/auth \
22 -e "REGISTRY_AUTH=htpasswd" \

Subscribers

People subscribed via source and target branches

to all changes: