.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Giles Bradshaw 2020-08-06 18:10:19 +01:00
parent 822a9c0550
commit ad775128bc
3 changed files with 21 additions and 14 deletions

View File

@ -68,10 +68,11 @@ local util = import 'lib/util.libsonnet';
), ),
images.wait(15), images.wait(15),
images.docker { images.docker {
name +: 'build docker image:', name +: 'build docker:dind image:',
environment +: environment.environmentSecrets([ environment +: environment.environmentSecrets([
'LOCAL_DOCKER_REGISTRY', 'LOCAL_DOCKER_REGISTRY',
'LOCAL_REGISTRY_PASSWORD', 'LOCAL_REGISTRY_PASSWORD',
'CA_CRT'
]), ]),
volumes: [ volumes: [
{ {
@ -81,15 +82,13 @@ local util = import 'lib/util.libsonnet';
], ],
commands: [ commands: [
'set -e', 'set -e',
'pwd',
'sleep 15', 'sleep 15',
'export SQUID_IMAGE=$${LOCAL_DOCKER_REGISTRY}squid', 'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"',
'docker pull $${SQUID_IMAGE}', 'cd docker-dind',
'cat "$${CA_CRT}" > CA_crt.crt',
//'docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"', 'docker build . -t $${LOCAL_DOCKER_REGISTRY}docker:dind',
//'docker build . -t $${LOCAL_DOCKER_REGISTRY}squid-4', 'docker push $${LOCAL_DOCKER_REGISTRY}docker:dind',
//'docker push $${LOCAL_DOCKER_REGISTRY}squid-4', 'docker logout $${LOCAL_DOCKER_REGISTRY}',
//'docker logout $${LOCAL_DOCKER_REGISTRY}',
], ],
}, /* }, /*
images.docker { images.docker {

View File

@ -70,15 +70,20 @@ steps:
commands: commands:
- sleep 15 - sleep 15
- name: "dockerbuild docker image:" - name: "dockerbuild docker:dind image:"
image: docker:dind image: docker:dind
commands: commands:
- set -e - set -e
- pwd
- sleep 15 - sleep 15
- export SQUID_IMAGE=$${LOCAL_DOCKER_REGISTRY}squid - docker login $${LOCAL_DOCKER_REGISTRY} --username client --password "$${LOCAL_REGISTRY_PASSWORD}"
- docker pull $${SQUID_IMAGE} - cd docker-dind
- cat "$${CA_CRT}" > CA_crt.crt
- docker build . -t $${LOCAL_DOCKER_REGISTRY}docker:dind
- docker push $${LOCAL_DOCKER_REGISTRY}docker:dind
- docker logout $${LOCAL_DOCKER_REGISTRY}
environment: environment:
CA_CRT:
from_secret: ca-crt
LOCAL_DOCKER_REGISTRY: LOCAL_DOCKER_REGISTRY:
from_secret: local-docker-registry from_secret: local-docker-registry
LOCAL_REGISTRY_PASSWORD: LOCAL_REGISTRY_PASSWORD:

3
docker-dind/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM docker:18.06.0-dind
COPY CA_crt.crt /usr/local/share/ca-certificates/CA_crt.crt
RUN update-ca-certificates