mirror of
https://github.com/containers/podman.git
synced 2025-06-26 21:07:02 +08:00
Merge pull request #2253 from kunalkushwaha/quick-dockerfile-build
Reduce Dockerfile based build time for libpod.
This commit is contained in:
17
Dockerfile
17
Dockerfile
@ -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
|
||||
@ -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
Makefile
1
Makefile
@ -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
|
||||
|
Reference in New Issue
Block a user