From cff1eba721257fbaa25c62ae0a426362df13bcca Mon Sep 17 00:00:00 2001 From: "Rus V. Brushkoff" Date: Tue, 28 Jun 2022 18:26:09 +0300 Subject: [PATCH] Rebase alpine image at edge tar file --- images/alpine/Dockerfile | 10 +++++++++- images/alpine/Makefile | 17 +++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/images/alpine/Dockerfile b/images/alpine/Dockerfile index 903a16b6a..dc0172b00 100644 --- a/images/alpine/Dockerfile +++ b/images/alpine/Dockerfile @@ -1,9 +1,11 @@ FROM scratch -# TODO: Base this on the alpine docker image, not the FC ext4 image +# Bases on the alpine edge tar file ADD alpine.tar / # Add an SSH server and start it automatically RUN apk add \ openssh \ + openrc \ + util-linux \ udev \ bash @@ -16,3 +18,9 @@ RUN rc-update add sshd && \ RUN echo "exit 0" > /etc/init.d/networking RUN echo "PermitTTY yes" >> /etc/ssh/sshd_config RUN rm /bin/sh && ln -s /bin/bash /bin/sh +# set the default root password for agetty +RUN echo root:root | chpasswd +# configure agetty +RUN ln -s /etc/init.d/agetty /etc/init.d/agetty.ttyS0 +RUN ln -s /etc/init.d/agetty.ttyS0 /etc/runlevels/default +RUN ln -s /etc/init.d/agetty.ttyS0 /etc/runlevels/nonetwork diff --git a/images/alpine/Makefile b/images/alpine/Makefile index db9a17639..dbc7945e0 100644 --- a/images/alpine/Makefile +++ b/images/alpine/Makefile @@ -4,13 +4,18 @@ DOCKER_USER?=weaveworks all: build -alpine.ext4: - curl -sSL https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4 > alpine.ext4 +#alpine.ext4: +# curl -sSL https://s3.amazonaws.com/spec.ccfc.min/img/hello/fsfiles/hello-rootfs.ext4 > alpine.ext4 + +#alpine.tar: alpine.ext4 +# sudo mount -o loop $(shell pwd)/alpine.ext4 ${TEMP_DIR} +# cd ${TEMP_DIR} && sudo tar -cf $(shell pwd)/alpine.tar . +# sudo umount $(shell pwd)/alpine.ext4 + +alpine.tar: + curl -sSL https://github.com/alpinelinux/docker-alpine/raw/edge/x86_64/alpine-minirootfs-20220328-x86_64.tar.gz > alpine.tar.gz + gzip -d alpine.tar.gz -alpine.tar: alpine.ext4 - sudo mount -o loop $(shell pwd)/alpine.ext4 ${TEMP_DIR} - cd ${TEMP_DIR} && sudo tar -cf $(shell pwd)/alpine.tar . - sudo umount $(shell pwd)/alpine.ext4 # alpine.tar build: docker build -t ${DOCKER_USER}/ignite-alpine:${VERSION} .