StevenWeathers / thunderdome-planning-poker

⚡ Thunderdome is an open source agile planning poker, sprint retro, and story mapping tool

Home Page:https://thunderdome.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RUN apk update && apk add --no-cache git ca-certificates failing

ogghi opened this issue · comments

Hi there, I am trying to set this up, getting issue during startup.

=> [internal] load metadata for docker.io/library/golang:1.21-alpine 0.8s
=> [internal] load metadata for docker.io/library/node:18.5 0.7s
=> [internal] load build context 0.0s
=> => transferring context: 19.72kB 0.0s
=> [buildernode 1/7] FROM docker.io/library/node:18.5@sha256:a466525364309cbba6bb4989d7ff926334a08f2f822be0e1e9ca6f0773910430 0.0s
=> CACHED [buildergo 1/14] FROM docker.io/library/golang:1.21-alpine@sha256:feceecc0e1d73d085040a8844de11a2858ba4a0c58c16a672f1736daecc2a4ff 0.0s
=> ERROR [buildergo 2/14] RUN apk update && apk add --no-cache git ca-certificates 10.3s
=> CACHED [buildernode 2/7] RUN mkdir /webapp 0.0s
=> CACHED [buildernode 3/7] COPY ./ui/ /webapp/ui/ 0.0s
=> CACHED [buildernode 4/7] WORKDIR /webapp/ui 0.0s
=> CACHED [buildernode 5/7] RUN npm set progress=false 0.0s
=> CANCELED [buildernode 6/7] RUN npm ci --no-optional 10.4s

[buildergo 2/14] RUN apk update && apk add --no-cache git ca-certificates:
0.253 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
5.258 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
5.258 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/main: temporary error (try again later)
10.26 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/community: temporary error (try again later)
10.26 4 unavailable, 0 stale; 16 distinct packages available
------[[3~^[[3~
Dockerfile:22


20 | # Git is required for fetching the dependencies.
21 | # Ca-certificates is required to call HTTPS endpoints.
22 | >>> RUN apk update && apk add --no-cache git ca-certificates
23 | # Create appuser
24 | RUN adduser -D -g '' appuser

ERROR: failed to solve: process "/bin/sh -c apk update && apk add --no-cache git ca-certificates" did not complete successfully: exit code: 4
ERROR: Service 'thunderdome' failed to build : Build failed

I searched around and added a SED line to change https to http in build/Dockerfile.
This did not change a things though.

Any idea?

Sys environment:
Docker version 24.0.7, build afdd53b
on
Description: Ubuntu 22.04.3 LTS

Best
ogghi

...ok, formatting got crazy here :D

Thanks for the reply @StevenWeathers
That's the thing, outgoing connections are pretty much open here.

I can download with wget the APKINDEX.tar.gz file w/o issues from a shell on the VM where I try to build the container.

It seems only during the container creation that it does not have DNS or so?

Only thing I changed is the exposed port, from 8080 to 8081 as 8080 is used by another container here already.

Also tried to add DNS option in docker-compose, but same result.

Any hint, @StevenWeathers ?

Not sure honestly, container builds fine for me and dockerhub.

Interesting! What system / environment are you on?

This is so odd, even after modifying to http instead of https those APK download links, same issue:

docker-compose up
Building thunderdome
[+] Building 10.7s (13/29) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 184B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.30kB 0.0s
=> [internal] load metadata for docker.io/library/golang:1.21-alpine 0.3s
=> [internal] load metadata for docker.io/library/node:18.5 0.3s
=> CACHED [buildergo 1/14] FROM docker.io/library/golang:1.21-alpine@sha256:4db4aac30880b978cae5445dd4a706215249ad4f43d28bd7cdf7906e9be8dd6b 0.0s
=> [buildernode 1/7] FROM docker.io/library/node:18.5@sha256:a466525364309cbba6bb4989d7ff926334a08f2f822be0e1e9ca6f0773910430 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 19.72kB 0.0s
=> ERROR [buildergo 2/14] RUN apk update && apk add --no-cache git ca-certificates 10.2s
=> CACHED [buildernode 2/7] RUN mkdir /webapp 0.0s
=> CACHED [buildernode 3/7] COPY ./ui/ /webapp/ui/ 0.0s
=> CACHED [buildernode 4/7] WORKDIR /webapp/ui 0.0s
=> CACHED [buildernode 5/7] RUN npm set progress=false 0.0s
=> CANCELED [buildernode 6/7] RUN npm ci --no-optional 10.3s
[buildergo 2/14] RUN apk update && apk add --no-cache git ca-certificates:
0.197 fetch http://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
5.202 fetch http://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
5.202 WARNING: updating and opening http://dl-cdn.alpinelinux.org/alpine/v3.19/main: temporary error (try again later)
10.21 WARNING: updating and opening http://dl-cdn.alpinelinux.org/alpine/v3.19/community: temporary error (try again later)
10.21 4 unavailable, 0 stale; 16 distinct packages available
Dockerfile:22
20 | # Git is required for fetching the dependencies.
21 | # Ca-certificates is required to call HTTPS endpoints.
22 | >>> RUN apk update && apk add --no-cache git ca-certificates
23 | # Create appuser
24 | RUN adduser -D -g '' appuser
ERROR: failed to solve: process "/bin/sh -c apk update && apk add --no-cache git ca-certificates" did not complete successfully: exit code: 4
ERROR: Service 'thunderdome' failed to build : Build failed

Any idea?

Are you absolutely sure you don't have an http proxy set up in your normal system that is missing for the docker environment?

Yes, there is no proxy set up at all in our network or on the VM I am trying to get this to run.

Hi there! I created a fresh Ubuntu 22.04 VM and installed docker, cloned GIT repo, docker compose and it runs, so there must have been some weird issue on the VM I was trying to run it before!

Thanks and best regards!

OK, I can run the container but encounter this:

thunderdome-planning-poker-thunderdome-1 | {"level":"error","ts":1704783527.341893,"caller":"http/auth.go:342","msg":"handleCreateGuestUser error","version":"","error":"create guest user query error: ERROR: relation "thunderdome.users" does not exist (SQLSTATE 42P01)","user_name":"myuser","stacktrace":"github.com/StevenWeathers/thunderdome-planning-poker/internal/http.New.(*Service).handleCreateGuestUser.func21\n\t/go/src/github.com/stevenweathers/thunderdome-planning-poker/internal/http/auth.go:342\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2136\ngo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux.traceware.ServeHTTP\n\t/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux@v0.39.0/mux.go:155\ngithub.com/StevenWeathers/thunderdome-planning-poker/internal/http.(*Service).panicRecovery-fm.(*Service).panicRecovery.func1\n\t/go/src/github.com/stevenweathers/thunderdome-planning-poker/internal/http/middleware.go:25\nnet/http.HandlerFunc.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2136\ngithub.com/gorilla/mux.(*Router).ServeHTTP\n\t/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2938\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:2009"}

OK, restart, relaunch container etc. All seems fine. Thanks!