Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Rebase alpine image at edge tar file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sfinx committed Jun 28, 2022
1 parent c4162ac commit cff1eba
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
10 changes: 9 additions & 1 deletion images/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
17 changes: 11 additions & 6 deletions images/alpine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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} .
Expand Down

0 comments on commit cff1eba

Please sign in to comment.