forked from docker/machine
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #310 from jakefhyde/47853-revert-252
[47853] Downloading node drivers no longer works
- Loading branch information
Showing
1 changed file
with
12 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,25 @@ | ||
ARG BCI_VERSION=15.6 | ||
FROM registry.suse.com/bci/bci-base:15.6 | ||
|
||
FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} AS final | ||
FROM registry.suse.com/bci/bci-base:${BCI_VERSION} AS builder | ||
|
||
# Creates the base dir for the target image, and hydrates it with the | ||
# final image's contents. | ||
RUN mkdir /chroot | ||
COPY --from=final / /chroot/ | ||
ENV SSL_CERT_DIR /etc/rancher/ssl | ||
|
||
RUN zypper --non-interactive refresh && \ | ||
zypper --installroot /chroot -n rm busybox-less && \ | ||
zypper --installroot /chroot -n install \ | ||
git-core curl mkisofs openssh-clients openssl patterns-base-fips && \ | ||
RUN zypper -n update && \ | ||
zypper -n install git-core curl ca-certificates unzip mkisofs xz gzip sed tar openssh-clients && \ | ||
zypper -n clean -a && \ | ||
rm -rf /chroot/tmp/* /chroot/var/tmp/* /chroot/usr/share/doc/packages/* | ||
rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/* | ||
|
||
RUN useradd -u 1000 machine | ||
RUN cp /etc/passwd /chroot/etc/passwd | ||
|
||
COPY download_driver.sh /chroot/usr/local/bin/ | ||
RUN chmod +x /chroot/usr/local/bin/download_driver.sh | ||
|
||
COPY rancher-machine entrypoint.sh /chroot/usr/local/bin/ | ||
RUN chmod 0755 /chroot/usr/local/bin | ||
|
||
FROM scratch | ||
|
||
ENV SSL_CERT_DIR /etc/rancher/ssl | ||
|
||
COPY --from=builder /chroot / | ||
|
||
RUN mkdir -p .docker/machine/machines /etc/rancher/ssl /home/machine && \ | ||
chown -R machine /etc/rancher/ssl && \ | ||
chown -R machine /home/machine | ||
|
||
COPY download_driver.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/download_driver.sh | ||
|
||
COPY rancher-machine entrypoint.sh /usr/local/bin/ | ||
RUN chmod 0777 /usr/local/bin | ||
|
||
USER 1000 | ||
WORKDIR /home/machine | ||
|
||
ENTRYPOINT ["entrypoint.sh"] |