Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Automated builds fail #86

Closed
dtzar opened this issue May 27, 2021 · 8 comments · Fixed by #94
Closed

Docker Automated builds fail #86

dtzar opened this issue May 27, 2021 · 8 comments · Fixed by #94

Comments

@dtzar
Copy link
Owner

dtzar commented May 27, 2021

We don't use the docker automated build images for actual use, BUT if they fail then the readme doesn't get updated and you can get failed build messages and such. Log output from Docker automated build:

Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '140.82.112.4' to the list of known hosts.
Switched to a new branch '3.5.4'
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'19.03.8', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2020-03-11T01:24:30.000000000+00:00', u'ApiVersion': u'1.40', u'MinAPIVersion': u'1.12', u'GitCommit': u'afacb8b7f0', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.12.17'}}, {u'Version': u'1.2.13', u'Name': u'containerd', u'Details': {u'GitCommit': u'7ad184331fa3e55e52b890ea95e65ba581ae3429'}}, {u'Version': u'1.0.0-rc10', u'Name': u'runc', u'Details': {u'GitCommit': u'dc9208a3303feef5b3839f4323d9beb36df0a9dd'}}, {u'Version': u'0.18.0', u'Name': u'docker-init', u'Details': {u'GitCommit': u'fec3683'}}]
Arch: amd64
BuildTime: 2020-03-11T01:24:30.000000000+00:00
ApiVersion: 1.40
Platform: {u'Name': u'Docker Engine - Community'}
Version: 19.03.8
MinAPIVersion: 1.12
GitCommit: afacb8b7f0
Os: linux
GoVersion: go1.12.17
Starting build of index.docker.io/dtzar/helm-kubectl:tagtemp...
Step 1/9 : FROM alpine:3
---> 6dbb9cc54074
Step 2/9 : ARG VCS_REF
---> Running in 9d49f83ac345
Removing intermediate container 9d49f83ac345
---> 61e6eb5afc2e
Step 3/9 : ARG BUILD_DATE
---> Running in 1c4770778f7c
Removing intermediate container 1c4770778f7c
---> 2cde39894c72
Step 4/9 : ARG KUBE_VERSION
---> Running in df2559aa5520
Removing intermediate container df2559aa5520
---> 013e14268270
Step 5/9 : ARG HELM_VERSION
---> Running in dd30f8ba52f8
Removing intermediate container dd30f8ba52f8
---> 14f592d87aa6
Step 6/9 : LABEL org.label-schema.vcs-ref=$VCS_REF org.label-schema.name="helm-kubectl" org.label-schema.url="https://hub.docker.com/r/dtzar/helm-kubectl/" org.label-schema.vcs-url="https://github.com/dtzar/helm-kubectl" org.label-schema.build-date=$BUILD_DATE
---> Running in 2e5901839500
Removing intermediate container 2e5901839500
---> c26665dc603e
Step 7/9 : RUN apk add --no-cache ca-certificates bash git openssh curl gettext jq bind-tools && wget -q https://storage.googleapis.com/kubernetes-release/release/v${KUBE_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl && wget -q https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm && chmod +x /usr/local/bin/helm && chmod g+rwx /root && mkdir /config && chmod g+rwx /config && helm repo add "stable" "https://charts.helm.sh/stable" --force-update
---> Running in 37e29ad0d0eb
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
(1/43) Installing ncurses-terminfo-base (6.2_p20210109-r0)
(2/43) Installing ncurses-libs (6.2_p20210109-r0)
(3/43) Installing readline (8.1.0-r0)
(4/43) Installing bash (5.1.0-r0)
Executing bash-5.1.0-r0.post-install
(5/43) Installing fstrm (0.6.0-r1)
(6/43) Installing krb5-conf (1.0-r2)
(7/43) Installing libcom_err (1.45.7-r0)
(8/43) Installing keyutils-libs (1.6.3-r0)
(9/43) Installing libverto (0.3.1-r1)
(10/43) Installing krb5-libs (1.18.3-r1)
(11/43) Installing json-c (0.15-r1)
(12/43) Installing libgcc (10.2.1_pre1-r3)
(13/43) Installing libstdc++ (10.2.1_pre1-r3)
(14/43) Installing libprotobuf (3.13.0-r2)
(15/43) Installing libprotoc (3.13.0-r2)
(16/43) Installing protobuf-c (1.3.3-r4)
(17/43) Installing libuv (1.40.0-r0)
(18/43) Installing xz-libs (5.2.5-r0)
(19/43) Installing libxml2 (2.9.10-r6)
(20/43) Installing bind-libs (9.16.11-r0)
(21/43) Installing bind-tools (9.16.11-r0)
(22/43) Installing ca-certificates (20191127-r5)
(23/43) Installing brotli-libs (1.0.9-r3)
(24/43) Installing nghttp2-libs (1.42.0-r1)
(25/43) Installing libcurl (7.76.1-r0)
(26/43) Installing curl (7.76.1-r0)
(27/43) Installing libgomp (10.2.1_pre1-r3)
(28/43) Installing libintl (0.20.2-r2)
(29/43) Installing libunistring (0.9.10-r0)
(30/43) Installing gettext-libs (0.20.2-r2)
(31/43) Installing gettext (0.20.2-r2)
(32/43) Installing expat (2.2.10-r1)
(33/43) Installing pcre2 (10.36-r0)
(34/43) Installing git (2.30.2-r0)
(35/43) Installing oniguruma (6.9.6-r0)
(36/43) Installing jq (1.6-r1)
(37/43) Installing openssh-keygen (8.4_p1-r3)
(38/43) Installing libedit (20191231.3.1-r1)
(39/43) Installing openssh-client (8.4_p1-r3)
(40/43) Installing openssh-sftp-server (8.4_p1-r3)
(41/43) Installing openssh-server-common (8.4_p1-r3)
(42/43) Installing openssh-server (8.4_p1-r3)
(43/43) Installing openssh (8.4_p1-r3)
Executing busybox-1.32.1-r6.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 45 MiB in 57 packages
�[91mwget: server returned error: HTTP/1.1 404 Not Found
�[0m
Removing intermediate container 37e29ad0d0eb
The command '/bin/sh -c apk add --no-cache ca-certificates bash git openssh curl gettext jq bind-tools && wget -q https://storage.googleapis.com/kubernetes-release/release/v${KUBE_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl && wget -q https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm && chmod +x /usr/local/bin/helm && chmod g+rwx /root && mkdir /config && chmod g+rwx /config && helm repo add "stable" "https://charts.helm.sh/stable" --force-update' returned a non-zero code: 1
@gaby
Copy link
Collaborator

gaby commented May 28, 2021

This is probably related to my changes a few months ago, where the TAG for helm and kubectl are no longer pre-baked into the Docker Image.

@dtzar
Copy link
Owner Author

dtzar commented May 28, 2021

Yes, that's correct. What is your docker ID and I'll add you as collaborator. I added in the KUBE_VERSION and HELM_VERSION env variables to docker automated builds, but that didn't fix it. My guess is because it is an ARG, not an ENV in the Dockerfile it doesn't pick it up.

@gaby
Copy link
Collaborator

gaby commented Jun 3, 2021

@dtzar My docker id is: gabyops, I had to created an account since I didn't have one.

One solution could be to use Build Hooks from Docker Hub. it basically requires a bash file inside a hooks folder that Docker will execute. Info here: https://docs.docker.com/docker-hub/builds/advanced/

Example of the hooks here: https://github.com/SamueleA/docker-hub-auto-build-tutorial/blob/master/hooks/build

We could then make Travis/Makefile reuse that bash file for building the image in travis-ci for example.

@dtzar
Copy link
Owner Author

dtzar commented Jun 3, 2021

I added you @gaby

@gaby
Copy link
Collaborator

gaby commented Jun 4, 2021

@dtzar I don't see it anywhere on my profile. Unless Docker Hub works that way.

@dtzar
Copy link
Owner Author

dtzar commented Jun 4, 2021

yeah, you should just be able to go to the image on Docker Hub and see you have access

@dtzar
Copy link
Owner Author

dtzar commented Jul 19, 2021

I manually fixed this, but since Docker is moving to making you pay to build automated docker images - we should abandon this anyways.

@gaby
Copy link
Collaborator

gaby commented Jul 20, 2021

Agree, one popular option could be to migrate to Github Actions, which support Docker Builds/tags/push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants