test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steve McMaster 2023-08-11 23:57:50 -04:00
parent 508df82452
commit fcdfc4e202
2 changed files with 15 additions and 33 deletions

View File

@ -4,7 +4,7 @@ type: docker
steps:
- name: build
image: golang
image: golang:alpine
commands:
- go test ./...
- sh scripts/build.sh

View File

@ -1,40 +1,22 @@
FROM fedora
FROM alpine:3.18
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
RUN addgroup \
-g 1000 \
build
# Workaround - the first install somehow leaves the golang in a bad state
RUN dnf -y install golang
RUN adduser \
-h /home/build \
-s /bin/sh \
-u 1000 \
-G build \
-D \
build
RUN mkdir /root/buildah && \
cd /root/buildah && \
git clone https://github.com/harness/buildah.git ./src/github.com/containers/buildah
RUN apk add --no-cache buildah
RUN cd /root/buildah/src/github.com/containers/buildah && make && sudo make install
FROM quay.io/buildah/stable:v1.23.0
ADD release/linux/amd64/drone-docker /bin/
ENV STORAGE_DRIVER vfs
USER build
WORKDIR /home/build
RUN export STORAGE_DRIVER=vfs
# Add plugin binary
ADD release/linux/amd64/drone-docker /bin/
COPY --from=0 /root/buildah/src/github.com/containers/buildah/bin/. /bin/
ENTRYPOINT ["/bin/drone-docker"]