Skip to content

Instantly share code, notes, and snippets.

@paolobueno
Created January 9, 2018 17:08
Show Gist options
  • Save paolobueno/c3430125b2ab43f22884597f6314b29d to your computer and use it in GitHub Desktop.
Save paolobueno/c3430125b2ab43f22884597f6314b29d to your computer and use it in GitHub Desktop.
apb halp
➜ metrics-apb git:(darahayes) make apb_build
docker run --rm --privileged -v /home/paolo/work/metrics-apb:/mnt:z -v /home/paolo/.kube:/
sock -u 1000 docker.io/ansibleplaybookbundle/apb-tools:latest prepare
setgroups: Operation not permitted
setgid: Operation not permitted
Makefile:11: recipe for target 'apb_build' failed
make: *** [apb_build] Error 1
➜ metrics-apb git:(darahayes) sudo make apb_build
[sudo] password for paolo:
docker run --rm --privileged -v /home/paolo/work/metrics-apb:/mnt:z -v /home/paolo/.kube:/
sock -u 0 docker.io/ansibleplaybookbundle/apb-tools:latest prepare
groupadd: GID '0' already exists
usermod: group 'apb' does not exist
Finished writing dockerfile.
docker build -t docker.io/aerogearcatalog/metrics-apb:latest .
Sending build context to Docker daemon 236kB
Step 1/6 : FROM ansibleplaybookbundle/apb-base
latest: Pulling from ansibleplaybookbundle/apb-base
74f0853ba93b: Already exists
2116545c822c: Already exists
f850972f7285: Already exists
dfe93498370e: Already exists
Digest: sha256:7660600b255abd74316ac178aba5d15857be901f7a22a1eeb19d94593cc8e208
Status: Downloaded newer image for ansibleplaybookbundle/apb-base:latest
---> b5f15eaf75a4
Step 2/6 : LABEL "com.redhat.apb.spec"="dmVyc2lvbjogMS4wCm5hbWU6IG1ldHJpY3MtYXBiCmRlc2NyaX
YXNlZCBvbiBQcm9tZXRoZXVzIGFuZCBHcmFmYW5hCmJpbmRhYmxlOiBGYWxzZQphc3luYzogb3B0aW9uYWwKdGFncz
c3BsYXlOYW1lOiBNZXRyaWNzCiAgaW1hZ2VVcmw6ICJodHRwczovL2F2YXRhcnMxLmdpdGh1YnVzZXJjb250ZW50Lm
YXRpb25Vcmw6ICJodHRwczovL3Byb21ldGhldXMuaW8vZG9jcy9pbnRyb2R1Y3Rpb24vb3ZlcnZpZXcvIgogIHByb3
IHNlcnZpY2VOYW1lOiBwcm9tZXRoZXVzCnBsYW5zOgogIC0gbmFtZTogZGVmYXVsdAogICAgZGVzY3JpcHRpb246IF
YWZhbmEgZm9yIG1ldHJpY3MgYW5kIGRhdGEgdmlzdWFsaXNhdGlvbgogICAgZnJlZTogVHJ1ZQogICAgbWV0YWRhdG
OiBHUkFGQU5BX1NUT1JBR0VfU0laRQogICAgICAgIHJlcXVpcmVkOiBUcnVlCiAgICAgICAgZGVmYXVsdDogMTAKIC
R3JhZmFuYSBTdG9yYWdlIFNpemUgKEdiKQogICAgICAtIG5hbWU6IFBST01FVEhFVVNfU1RPUkFHRV9TSVpFCiAgIC
OiAxMAogICAgICAgIHR5cGU6IG51bWJlcgogICAgICAgIHRpdGxlOiBQcm9tZXRoZXVzIFN0b3JhZ2UgU2l6ZSAoR2
---> Running in c65835b1c629
Removing intermediate container c65835b1c629
---> 42a024425ef9
Step 3/6 : COPY playbooks /opt/apb/actions
---> 99541691488f
Step 4/6 : COPY roles /opt/ansible/roles
---> 431df7ba02b3
Step 5/6 : RUN chmod -R g=u /opt/{ansible,apb}
---> Running in 2fe528f9115c
Removing intermediate container 2fe528f9115c
---> dd14a1d66f0c
Step 6/6 : USER apb
---> Running in ac61b1974504
Removing intermediate container ac61b1974504
---> 69114376a8a5
Successfully built 69114376a8a5
Successfully tagged aerogearcatalog/metrics-apb:latest
➜ metrics-apb git:(darahayes) sudo apb push -o
setgroups: Operation not permitted
setgid: Operation not permitted
➜ metrics-apb git:(darahayes) which apb
apb: aliased to docker run --rm --privileged -v $PWD:/mnt -v $HOME/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $UID docker.io/ansibleplaybookbundle/apb-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment