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't build docker image with podman #61

Closed
carlhoerberg opened this issue Apr 29, 2021 · 4 comments
Closed

Can't build docker image with podman #61

carlhoerberg opened this issue Apr 29, 2021 · 4 comments

Comments

@carlhoerberg
Copy link

$ podman build -t sx .
STEP 1: FROM golang:1.16-alpine AS builder
✔ docker.io/library/golang:1.16-alpine
Getting image source signatures
Copying blob 540db60ca938 done
Copying blob 0510c868ecb4 done
Copying blob 4c4ab2625f07 done
Copying blob afea3b2eda06 done
Copying blob adcc1eea9eea done
Copying config 270727b8fd done
Writing manifest to image destination
Storing signatures
STEP 2: RUN apk add --no-cache libpcap-dev libc-dev gcc linux-headers
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/17) Installing libgcc (10.2.1_pre1-r3)
(2/17) Installing libstdc++ (10.2.1_pre1-r3)
(3/17) Installing binutils (2.35.2-r1)
(4/17) Installing libgomp (10.2.1_pre1-r3)
(5/17) Installing libatomic (10.2.1_pre1-r3)
(6/17) Installing libgphobos (10.2.1_pre1-r3)
(7/17) Installing gmp (6.2.1-r0)
(8/17) Installing isl22 (0.22-r0)
(9/17) Installing mpfr4 (4.1.0-r0)
(10/17) Installing mpc1 (1.2.0-r0)
(11/17) Installing gcc (10.2.1_pre1-r3)
(12/17) Installing musl-dev (1.2.2-r0)
(13/17) Installing libc-dev (0.7.2-r3)
(14/17) Installing libpcap (1.10.0-r0)
(15/17) Installing pkgconf (1.7.3-r0)
(16/17) Installing libpcap-dev (1.10.0-r0)
(17/17) Installing linux-headers (5.7.8-r0)
Executing busybox-1.32.1-r6.trigger
OK: 135 MiB in 32 packages
--> 5af35877a00
STEP 3: ADD . /app
--> 67e808a4805
STEP 4: WORKDIR /app
--> 93f4d5205ce
STEP 5: RUN go build -ldflags "-w -s" -o /sx
go: github.com/docker/docker@v20.10.6+incompatible: Get "https://proxy.golang.org/github.com/docker/docker/@v/v20.10.6+incompatible.mod": dial tcp: lookup proxy.golang.org: Try again
STEP 6: FROM alpine:3.13
Error: error building at STEP "RUN go build -ldflags "-w -s" -o /sx": error while running runtime: exit status 1
@v-byte-cpu
Copy link
Owner

v-byte-cpu commented Apr 29, 2021

Hi @carlhoerberg, I just successfully ran an image build using docker

docker build . -t sx

I will try with podman

@v-byte-cpu v-byte-cpu changed the title Can't build docker image Can't build docker image with podman Apr 29, 2021
@v-byte-cpu
Copy link
Owner

The podman build also works successfully

$ podman build -t sx .
STEP 1: FROM golang:1.16-alpine AS builder
STEP 2: RUN apk add --no-cache libpcap-dev libc-dev gcc linux-headers
--> Using cache ab4bd91f4c0bef8030dc1af479bf7072d24c23551b18801ca2f619752d5282c7
--> ab4bd91f4c0
STEP 3: ADD . /app
--> 442159ba42e
STEP 4: WORKDIR /app
--> 2cd15e8756f
STEP 5: RUN go build -ldflags "-w -s" -o /sx
go: downloading github.com/google/gopacket v1.1.20-0.20210304165259-20562ffb40f8
go: downloading github.com/spf13/cobra v1.1.3
go: downloading go.uber.org/ratelimit v0.2.0
go: downloading github.com/vishvananda/netlink v1.1.0
go: downloading go.uber.org/zap v1.16.0
go: downloading golang.org/x/net v0.0.0-20210323141857-08027d57d8cf
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/docker/docker v20.10.6+incompatible
go: downloading github.com/moby/moby v20.10.6+incompatible
go: downloading github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df
go: downloading golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005
go: downloading go.uber.org/atomic v1.7.0
go: downloading go.uber.org/multierr v1.6.0
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/docker/distribution v2.7.1+incompatible
go: downloading github.com/containerd/containerd v1.4.4
go: downloading github.com/docker/go-connections v0.4.0
go: downloading github.com/opencontainers/go-digest v1.0.0
go: downloading github.com/opencontainers/image-spec v1.0.1
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/docker/go-units v0.4.0
go: downloading github.com/sirupsen/logrus v1.4.1
go: downloading google.golang.org/grpc v1.21.1
go: downloading github.com/gogo/protobuf v1.2.1
go: downloading google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a
go: downloading github.com/golang/protobuf v1.3.2
--> 83151187ea9
STEP 6: FROM alpine:3.13
STEP 7: RUN apk add libpcap
--> Using cache 84cc68bde162c39fce723b8380695317d216b9174a462b80b24e96553ecf9e3b
--> 84cc68bde16
STEP 8: COPY --from=builder /sx /sx
--> Using cache 4154aee0a641f6e1b674032b1c9f4bf87141ba03bcfb082a5c4fb85c0b57eee4
--> 4154aee0a64
STEP 9: ENTRYPOINT ["/sx"]
--> Using cache 8b856655cb00c01d22596decacb0843530a670aece291bd095cbc9dad21d9603
STEP 10: COMMIT sx
--> 8b856655cb0
8b856655cb00c01d22596decacb0843530a670aece291bd095cbc9dad21d9603

@v-byte-cpu
Copy link
Owner

v-byte-cpu commented Apr 29, 2021

it looks like you have a problem with DNS resolving the proxy.golang.org domain

dial tcp: lookup proxy.golang.org: Try again

I will create a release in the near future so you don't have to assemble everything by hand

@carlhoerberg
Copy link
Author

You're right, some temporary problem, sorry about that

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

No branches or pull requests

2 participants