two stage building
This commit is contained in:
parent
c8b68d31ab
commit
38f0f1bd3f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
release
|
release
|
||||||
coverage.out
|
coverage.out
|
||||||
vendor
|
vendor
|
||||||
|
buildah-binaries
|
||||||
|
|||||||
33
Dockerfile-build-buildah
Normal file
33
Dockerfile-build-buildah
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
FROM fedora
|
||||||
|
|
||||||
|
RUN dnf -y install \
|
||||||
|
make \
|
||||||
|
golang \
|
||||||
|
bats \
|
||||||
|
btrfs-progs-devel \
|
||||||
|
device-mapper-devel \
|
||||||
|
glib2-devel \
|
||||||
|
gpgme-devel \
|
||||||
|
libassuan-devel \
|
||||||
|
libseccomp-devel \
|
||||||
|
git \
|
||||||
|
bzip2 \
|
||||||
|
go-md2man \
|
||||||
|
runc \
|
||||||
|
containers-common \
|
||||||
|
skopeo-containers
|
||||||
|
|
||||||
|
# Workaround - the first install somehow leaves the golang in a bad state
|
||||||
|
RUN dnf -y install golang
|
||||||
|
|
||||||
|
ARG GIT_USER_NAME
|
||||||
|
RUN git config --global user.name "$GIT_USER_NAME"
|
||||||
|
|
||||||
|
ARG GIT_USER_EMAIL
|
||||||
|
RUN git config --global user.email "$GIT_USER_EMAIL"
|
||||||
|
|
||||||
|
RUN mkdir /root/buildah && \
|
||||||
|
cd /root/buildah && \
|
||||||
|
git clone https://github.com/harness/buildah.git ./src/github.com/containers/buildah
|
||||||
|
|
||||||
|
RUN cd /root/buildah/src/github.com/containers/buildah && make && sudo make install
|
||||||
10
build-buildah-binaries.sh
Executable file
10
build-buildah-binaries.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
docker build --build-arg=GIT_USER_NAME="$(git config user.name)" --build-arg=GIT_USER_EMAIL="$(git config user.email)" \
|
||||||
|
-f Dockerfile-build-buildah -t buildah-dev .
|
||||||
|
|
||||||
|
mkdir buildah-binaries
|
||||||
|
|
||||||
|
docker container create --name extract buildah-dev
|
||||||
|
docker container cp extract:/root/buildah/src/github.com/containers/buildah/bin ./buildah-binaries
|
||||||
|
docker container rm -f extract
|
||||||
@ -5,7 +5,7 @@ WORKDIR /home/build
|
|||||||
RUN export STORAGE_DRIVER=vfs
|
RUN export STORAGE_DRIVER=vfs
|
||||||
# Add plugin binary
|
# Add plugin binary
|
||||||
ADD release/linux/amd64/drone-docker /bin/
|
ADD release/linux/amd64/drone-docker /bin/
|
||||||
ADD prebuilt/buildah /bin/
|
ADD buildah-binaries/bin/buildah /bin/
|
||||||
ADD prebuilt/imgtype /bin/
|
ADD buildah-binaries/bin/imgtype /bin/
|
||||||
ADD prebuilt/copy /bin/
|
ADD buildah-binaries/bin/copy /bin/
|
||||||
ENTRYPOINT ["/bin/drone-docker"]
|
ENTRYPOINT ["/bin/drone-docker"]
|
||||||
BIN
prebuilt/buildah
BIN
prebuilt/buildah
Binary file not shown.
BIN
prebuilt/copy
BIN
prebuilt/copy
Binary file not shown.
BIN
prebuilt/imgtype
BIN
prebuilt/imgtype
Binary file not shown.
Loading…
Reference in New Issue
Block a user