mirror of
https://github.com/drone-plugins/drone-buildah.git
synced 2026-06-16 14:50:32 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c62ad79f25 | |||
| 8d6332db5d | |||
| eb1db70c33 | |||
| 5a8a28e124 | |||
| 346e74f38b | |||
| 4c7f48edfd | |||
| 34aae448e1 | |||
| 759b6ba2f6 |
@@ -1,9 +1,29 @@
|
||||
FROM quay.io/buildah/stable:v1.36.0
|
||||
|
||||
# Set up the working directory
|
||||
USER root
|
||||
|
||||
RUN dnf -y install fuse-overlayfs shadow-utils && dnf clean all
|
||||
|
||||
RUN touch /etc/subgid /etc/subuid \
|
||||
&& chmod g=u /etc/subgid /etc/subuid /etc/passwd \
|
||||
&& echo build:10000:65536 > /etc/subuid \
|
||||
&& echo build:10000:65536 > /etc/subgid
|
||||
|
||||
USER build
|
||||
# Use chroot since the default runc does not work when running rootless
|
||||
ENV _BUILDAH_STARTED_IN_USERNS=""
|
||||
ENV BUILDAH_ISOLATION=chroot
|
||||
ENV STORAGE_DRIVER=vfs
|
||||
ENV PATH=$PATH:/usr/bin/
|
||||
|
||||
# Use overlay
|
||||
RUN mkdir -p /home/build/.config/containers \
|
||||
&& echo '[storage]' > /home/build/.config/containers/storage.conf \
|
||||
&& echo ' driver = "overlay"' >> /home/build/.config/containers/storage.conf \
|
||||
&& echo '[storage.options.overlay]' >> /home/build/.config/containers/storage.conf \
|
||||
&& echo ' mount_program = "/usr/bin/fuse-overlayfs"'>> /home/build/.config/containers/storage.conf
|
||||
|
||||
WORKDIR /home/build
|
||||
RUN export STORAGE_DRIVER=vfs
|
||||
|
||||
# Add the plugin binary
|
||||
ADD release/linux/amd64/drone-docker /bin/
|
||||
|
||||
Reference in New Issue
Block a user