change dockerfile
This commit is contained in:
parent
cd4f459538
commit
566cff614d
@ -1,22 +1,38 @@
|
|||||||
# Source for dockerfile:
|
FROM fedora
|
||||||
# https://github.com/containers/buildah/blob/master/docs/tutorials/05-openshift-rootless-bud.md
|
|
||||||
FROM quay.io/buildah/stable:v1.14.8
|
|
||||||
|
|
||||||
RUN touch /etc/subgid /etc/subuid \
|
RUN dnf -y install \
|
||||||
&& chmod g=u /etc/subgid /etc/subuid /etc/passwd \
|
make \
|
||||||
&& echo build:10000:65536 > /etc/subuid \
|
golang \
|
||||||
&& echo build:10000:65536 > /etc/subgid
|
bats \
|
||||||
|
btrfs-progs-devel \
|
||||||
|
device-mapper-devel \
|
||||||
|
glib2-devel \
|
||||||
|
gpgme-devel \
|
||||||
|
libassuan-devel \
|
||||||
|
libseccomp-devel \
|
||||||
|
git \
|
||||||
|
bzip2 \
|
||||||
|
go-md2man \
|
||||||
|
runc \
|
||||||
|
containers-common
|
||||||
|
|
||||||
# Use chroot since the default runc does not work when running rootless
|
# Workaround - the first install somehow leaves the golang in a bad state
|
||||||
RUN echo "export BUILDAH_ISOLATION=chroot" >> /home/build/.bashrc
|
RUN dnf -y install golang
|
||||||
|
|
||||||
# Use VFS since fuse does not work
|
ARG GIT_USER_NAME
|
||||||
RUN mkdir -p /home/build/.config/containers \
|
RUN git config --global user.name "$GIT_USER_NAME"
|
||||||
&& echo "driver=\"vfs\"" > /home/build/.config/containers/storage.conf
|
|
||||||
|
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 echo "alias bahrm='buildah rm --all && buildah rmi --all'" >> /root/.bashrc
|
||||||
|
RUN echo "alias bahbi='cd /root/buildah/src/github.com/containers/buildah && make && sudo make install && cd -'" >> /root/.bashrc
|
||||||
|
|
||||||
USER build
|
USER build
|
||||||
WORKDIR /home/build
|
WORKDIR /root/buildah/src/github.com/containers/buildah
|
||||||
|
ADD /root/buildah/src/github.com/containers/buildah /bin/
|
||||||
# Add plugin binary
|
ENTRYPOINT ["/root/buildah/src/github.com/containers/buildah"]
|
||||||
ADD release/linux/amd64/drone-docker /bin/
|
|
||||||
ENTRYPOINT ["/bin/drone-docker"]
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user