two stage
This commit is contained in:
parent
492e84d4b0
commit
6d4ce8c5ac
@ -1,27 +0,0 @@
|
||||
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
|
||||
|
||||
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
|
||||
@ -1,3 +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
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
FROM quay.io/buildah/stable:v1.23.0
|
||||
|
||||
USER build
|
||||
@ -5,7 +35,6 @@ WORKDIR /home/build
|
||||
RUN export STORAGE_DRIVER=vfs
|
||||
# Add plugin binary
|
||||
ADD release/linux/amd64/drone-docker /bin/
|
||||
ADD release/linux/amd64/buildah /bin/
|
||||
ADD release/linux/amd64/imgtype /bin/
|
||||
ADD release/linux/amd64/copy /bin/
|
||||
COPY --from=0 /root/buildah/src/github.com/containers/buildah/bin/. /bin/
|
||||
|
||||
ENTRYPOINT ["/bin/drone-docker"]
|
||||
@ -14,11 +14,4 @@ GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-gcr ./cmd/drone
|
||||
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-ecr ./cmd/drone-ecr
|
||||
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-docker ./cmd/drone-docker
|
||||
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-acr ./cmd/drone-acr
|
||||
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-heroku ./cmd/drone-heroku
|
||||
|
||||
#build buildah binaries
|
||||
docker build -f Dockerfile-build-buildah -t buildah-dev .
|
||||
|
||||
docker container create --name extract buildah-dev
|
||||
docker container cp extract:/root/buildah/src/github.com/containers/buildah/bin/. release/linux/amd64/
|
||||
docker container rm -f extract
|
||||
GOOS=linux GOARCH=amd64 go build -o release/linux/amd64/drone-heroku ./cmd/drone-heroku
|
||||
Loading…
Reference in New Issue
Block a user