New simplified Chromebook centric branch, without volume mounting on home + new alpine container image (should work on any aarch64)

This commit is contained in:
mrkmntal 2025-11-27 14:04:03 -05:00
commit be80458918
5 changed files with 135 additions and 32 deletions

View file

@ -0,0 +1,53 @@
FROM alpine:latest
# Core packages (Alpine equivalents)
RUN apk update && apk add --no-cache \
openssh \
sudo \
ca-certificates \
git \
curl wget \
vim nano \
htop \
build-base \
fastfetch
# Create 'micro' user with UID 1000 and primary group 'micro'
RUN addgroup -g 1000 micro && \
adduser -D -u 1000 -G micro -s /bin/sh micro && \
echo "micro:ChangeMe123" | chpasswd
# Create sudo group and add micro to it
RUN addgroup -S sudo && \
adduser micro sudo && \
# Enable sudo for %sudo group in /etc/sudoers
sed -i 's/# %sudo/%sudo/' /etc/sudoers
# Prepare .ssh directory
RUN mkdir -p /home/micro/.ssh && \
chown -R micro:micro /home/micro && \
chmod 700 /home/micro/.ssh
# SSH server config: key-only login, use ~/.ssh/authorized_keys
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config || true && \
sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config || true && \
sed -i 's/#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' /etc/ssh/sshd_config || true && \
sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config || true && \
sed -i 's|#AuthorizedKeysFile.*|AuthorizedKeysFile .ssh/authorized_keys|' /etc/ssh/sshd_config || true && \
echo 'UsePAM no' >> /etc/ssh/sshd_config
# sshd runtime dirs + host keys
RUN mkdir -p /var/run/sshd && \
ssh-keygen -A
# Fastfetch config for micro
RUN mkdir -p /home/micro/.config/fastfetch
COPY fastfetch_config.json /home/micro/.config/fastfetch/config.jsonc
RUN chown -R micro:micro /home/micro/.config && \
echo 'if command -v fastfetch >/dev/null 2>&1; then fastfetch; fi' >> /home/micro/.profile && \
chown micro:micro /home/micro/.profile
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IMAGE_NAME="$(basename "$(pwd)")"
echo "Building Docker image: ${IMAGE_NAME}:latest"
docker build -t "${IMAGE_NAME}:latest" .

View file

@ -0,0 +1,15 @@
{
"display": {
"separator": " == "
},
"modules": [
"title",
"os",
"kernel",
"cpu",
"memory",
"disk",
"shell"
]
}