forked from TheBuildBox/buildbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.fedora
More file actions
31 lines (24 loc) · 1.18 KB
/
Containerfile.fedora
File metadata and controls
31 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM registry.fedoraproject.org/fedora:43
LABEL maintainer="Michael Adam <obnox@samba.org>"
ARG BUILD_LANG=""
ARG INSTALL_SCRIPT=""
ARG VERIFY_SCRIPT=""
LABEL org.opencontainers.image.title="${BUILD_LANG} Build Container"
LABEL org.opencontainers.image.description="Container for building ${BUILD_LANG} projects"
LABEL org.opencontainers.image.vendor="buildbox"
LABEL org.opencontainers.image.url="https://github.com/obnoxxx/buildbox"
COPY "${VERIFY_SCRIPT}" /usr/local/bin/verify.sh
RUN chmod +x /usr/local/bin/verify.sh
COPY "${INSTALL_SCRIPT}" /usr/local/bin/install-packages.sh
RUN chmod +x /usr/local/bin/install-packages.sh
ENV PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin
# install, fix, and verify in ONE ATOMIC STEP
RUN true && \
# Force a sane PATH for the duration of the install
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin" && \
/usr/local/bin/install-packages.sh && \
echo "Restoring symlinks if broken..." && \
( [ -L /bin ] || (mv /bin/* /usr/bin/ && rm -rf /bin && ln -s usr/bin /bin) ) && \
echo "Verifying binaries before layer commit..." && \
/usr/local/bin/verify.sh && \
echo "your buildbox is ready."; \