PierreZ / goStatic

A really small static web server for Docker
GNU General Public License v2.0
391 stars 77 forks source link

Can not run docker build due to upx package missing in go:latest #63

Open tomscytale opened 10 months ago

tomscytale commented 10 months ago

docker build .

 > [builder 4/4] RUN mkdir ./bin &&     apt-get update && apt-get install -y upx &&     GOOS=$(echo linux/amd64 | cut -f1 -d/) &&     GOARCH=$(echo linux/amd64 | cut -f2 -d/) &&     GOARM=$(echo linux/amd64 | cut -f3 -d/ | sed "s/v//" ) &&     CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build ${BUILD_ARGS} -ldflags="-s" -tags netgo -installsuffix netgo -o ./bin/goStatic &&     mkdir ./bin/etc &&     ID=$(shuf -i 100-9999 -n 1) &&     upx -9 ./bin/goStatic &&     echo $ID &&     echo "appuser:x:$ID:$ID::/sbin/nologin:/bin/false" > ./bin/etc/passwd &&     echo "appgroup:x:$ID:appuser" > ./bin/etc/group:
0.975 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
1.459 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
1.547 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
1.596 Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8780 kB]
5.018 Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6668 B]
5.026 Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [101 kB]
6.051 Fetched 9139 kB in 5s (1736 kB/s)
6.051 Reading package lists...
6.632 Reading package lists...
7.233 Building dependency tree...
7.377 Reading state information...
7.386 E: Unable to locate package upx