|
1 | | -ARG BCI_VERSION=15.6 |
| 1 | +FROM registry.suse.com/bci/bci-base:15.6 |
2 | 2 |
|
3 | | -FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} AS final |
4 | | -FROM registry.suse.com/bci/bci-base:${BCI_VERSION} AS builder |
5 | | - |
6 | | -# Creates the base dir for the target image, and hydrates it with the |
7 | | -# final image's contents. |
8 | | -RUN mkdir /chroot |
9 | | -COPY --from=final / /chroot/ |
| 3 | +ENV SSL_CERT_DIR /etc/rancher/ssl |
10 | 4 |
|
11 | | -RUN zypper --non-interactive refresh && \ |
12 | | - zypper --installroot /chroot -n rm busybox-less && \ |
13 | | - zypper --installroot /chroot -n install \ |
14 | | - git-core curl mkisofs openssh-clients openssl patterns-base-fips && \ |
| 5 | +RUN zypper -n update && \ |
| 6 | + zypper -n install git-core curl ca-certificates unzip mkisofs xz gzip sed tar openssh-clients && \ |
15 | 7 | zypper -n clean -a && \ |
16 | | - rm -rf /chroot/tmp/* /chroot/var/tmp/* /chroot/usr/share/doc/packages/* |
| 8 | + rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/* |
17 | 9 |
|
18 | 10 | RUN useradd -u 1000 machine |
19 | | -RUN cp /etc/passwd /chroot/etc/passwd |
20 | | - |
21 | | -COPY download_driver.sh /chroot/usr/local/bin/ |
22 | | -RUN chmod +x /chroot/usr/local/bin/download_driver.sh |
23 | | - |
24 | | -COPY rancher-machine entrypoint.sh /chroot/usr/local/bin/ |
25 | | -RUN chmod 0755 /chroot/usr/local/bin |
26 | | - |
27 | | -FROM scratch |
28 | | - |
29 | | -ENV SSL_CERT_DIR /etc/rancher/ssl |
30 | | - |
31 | | -COPY --from=builder /chroot / |
32 | 11 |
|
33 | 12 | RUN mkdir -p .docker/machine/machines /etc/rancher/ssl /home/machine && \ |
34 | 13 | chown -R machine /etc/rancher/ssl && \ |
35 | 14 | chown -R machine /home/machine |
36 | 15 |
|
| 16 | +COPY download_driver.sh /usr/local/bin/ |
| 17 | +RUN chmod +x /usr/local/bin/download_driver.sh |
| 18 | + |
| 19 | +COPY rancher-machine entrypoint.sh /usr/local/bin/ |
| 20 | +RUN chmod 0777 /usr/local/bin |
| 21 | + |
37 | 22 | USER 1000 |
| 23 | +WORKDIR /home/machine |
38 | 24 |
|
39 | 25 | ENTRYPOINT ["entrypoint.sh"] |
0 commit comments