Skip to content

Commit 0e98dfe

Browse files
Fixing static build using container
1. LookupId panics on Linux+glibc static build (golang/go#24787) 2. Updated go version to 1.11.0 in Dockerfile.build 3. added go build tags netgo osusergo in static binary Signed-off-by: vijaysamanuri <vijay.samanuri@wavemaker.com>
1 parent 6307635 commit 0e98dfe

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Dockerfile.build

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
FROM ubuntu:18.10
22

3-
RUN apt-get update && apt-get install -y \
4-
golang \
5-
libbtrfs-dev \
3+
RUN apt-get update && apt-get install -y wget
4+
RUN wget -P /tmp/ https://dl.google.com/go/go1.11.linux-amd64.tar.gz && \
5+
tar -xvf /tmp/go1.11.linux-amd64.tar.gz -C /usr/local/
6+
7+
ENV GOROOT /usr/local/go
8+
ENV GOPATH /
9+
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
10+
11+
RUN apt-get install -y libbtrfs-dev \
612
git-core \
713
libdevmapper-dev \
814
libgpgme11-dev \
915
go-md2man \
1016
libglib2.0-dev \
1117
libostree-dev
1218

13-
ENV GOPATH=/
1419
WORKDIR /src/github.com/containers/skopeo

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(OSTREE_BUILD_TAG) $(D
5959
BUILDTAGS += $(LOCAL_BUILD_TAGS)
6060

6161
ifeq ($(DISABLE_CGO), 1)
62-
override BUILDTAGS = containers_image_ostree_stub exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp
62+
override BUILDTAGS = netgo osusergo containers_image_ostree_stub exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp
6363
endif
6464

6565
# make all DEBUG=1

0 commit comments

Comments
 (0)