forked from coreos/coreos-assembler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (27 loc) · 1.08 KB
/
Dockerfile
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
31
32
33
34
FROM registry.fedoraproject.org/fedora:31
WORKDIR /root/containerbuild
# We split into multiple steps here so that local dev workflows which involve
# rebuilding the container can leverage cached layers better.
# Only need a few of our scripts for the first few steps
COPY ./src/cmdlib.sh /root/containerbuild/src/
COPY ./build.sh ./deps*.txt ./vmdeps*.txt ./build-deps.txt /root/containerbuild/
RUN ./build.sh configure_yum_repos # nocache 20191205
RUN ./build.sh install_rpms
# Ok copy in the rest of them for the next few steps
COPY ./ /root/containerbuild/
RUN ./build.sh write_archive_info
RUN ./build.sh make_and_makeinstall
RUN ./build.sh configure_user
RUN make check
RUN make unittest
RUN make clean
# clean up scripts (it will get cached in layers, but oh well)
WORKDIR /srv/
RUN chown builder: /srv
RUN rm -rf /root/containerbuild
# allow writing to /etc/passwd from arbitrary UID
# https://docs.openshift.com/container-platform/3.10/creating_images/guidelines.html
RUN chmod g=u /etc/passwd
# run as `builder` user
USER builder
ENTRYPOINT ["/usr/bin/dumb-init", "/usr/bin/coreos-assembler"]