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

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

Open
tomscytale opened this issue Nov 14, 2023 · 0 comments · May be fixed by #64
Open

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

tomscytale opened this issue Nov 14, 2023 · 0 comments · May be fixed by #64

Comments

@tomscytale
Copy link

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
@tomscytale tomscytale linked a pull request Nov 14, 2023 that will close this issue
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.

1 participant