Skip to content

Commit

Permalink
Merge pull request containers#2253 from kunalkushwaha/quick-dockerfil…
Browse files Browse the repository at this point in the history
…e-build

Reduce Dockerfile based build time for libpod.
  • Loading branch information
openshift-merge-robot authored Feb 4, 2019
2 parents 0138430 + 5eb6fbe commit 778f986
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@ RUN apt-get update && apt-get install -y \
--no-install-recommends \
&& apt-get clean

ADD . /go/src/github.com/containers/libpod

RUN set -x && cd /go/src/github.com/containers/libpod && make install.libseccomp.sudo
ENV LIBSECCOMP_COMMIT release-2.3
RUN set -x \
&& git clone https://github.com/seccomp/libseccomp "$GOPATH/src/github.com/seccomp/libseccomp" \
&& cd "$GOPATH/src/github.com/seccomp/libseccomp" \
&& git fetch origin --tags \
&& git checkout -q "$LIBSECCOMP_COMMIT" \
&& ./autogen.sh \
&& ./configure --prefix=/usr \
&& make all \
&& make install

# Install runc
ENV RUNC_COMMIT 96ec2177ae841256168fcf76954f7177af9446eb
Expand Down Expand Up @@ -126,4 +133,8 @@ RUN mkdir -p /etc/containers && curl https://raw.githubusercontent.com/projectat
COPY test/policy.json /etc/containers/policy.json
COPY test/redhat_sigstore.yaml /etc/containers/registries.d/registry.access.redhat.com.yaml

ADD . /go/src/github.com/containers/libpod

RUN set -x && cd /go/src/github.com/containers/libpod

WORKDIR /go/src/github.com/containers/libpod
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ BUILD_INFO ?= $(shell date +%s)
LIBPOD := ${PROJECT}/libpod
LDFLAGS_PODMAN ?= $(LDFLAGS) -X $(LIBPOD).gitCommit=$(GIT_COMMIT) -X $(LIBPOD).buildInfo=$(BUILD_INFO)
ISODATE ?= $(shell date --iso-8601)
#Update to LIBSECCOMP_COMMIT should reflect in Dockerfile too.
LIBSECCOMP_COMMIT := release-2.3

# If GOPATH not specified, use one in the local directory
Expand Down

0 comments on commit 778f986

Please sign in to comment.