just an idea...

This commit is contained in:
Johannes Findeisen 2025-06-27 08:07:18 +02:00
commit 6b3e4be0ef
2 changed files with 32 additions and 11 deletions

View file

@ -1,4 +1,5 @@
FROM alpine:3.22 FROM alpine:latest
#FROM rust:alpine
ENV \ ENV \
CARGO_HOME=/usr/local/cargo \ CARGO_HOME=/usr/local/cargo \
@ -7,11 +8,15 @@ ENV \
RUSTUP_HOME=/usr/local/rustup \ RUSTUP_HOME=/usr/local/rustup \
TZ="Europe/Berlin" TZ="Europe/Berlin"
WORKDIR /root WORKDIR .
# Do this because next steps require some software packages to be installed # Do this because next steps require some software packages to be installed
RUN apk add --no-cache alpine-sdk ca-certificates perl RUN apk add --no-cache alpine-sdk ca-certificates perl
#RUN git clone https://git.xw3.org/hanez/home.git /root
#COPY root/.ssh /root/.ssh
# Install Rust (Copied from the official Rust Dockerfile) # Install Rust (Copied from the official Rust Dockerfile)
RUN \ RUN \
set -eux; \ set -eux; \
@ -37,16 +42,32 @@ RUN \
# Setup environment # Setup environment
RUN \ RUN \
apk update; \ apk update;\
apk upgrade --available; \ apk upgrade --available;\
apk add --no-cache bash byobu helix mc openssh shadow tmux vim zsh zsh-vcs neovim apk add --no-cache bash byobu git helix mc openssh shadow tmux vim zsh zsh-vcs neovim
WORKDIR /home/hanez
#RUN git clone https://git.xw3.org/hanez/home.git .
#COPY home/hanez/.ssh /home/hanez/.ssh
RUN \ RUN \
chsh -s /bin/zsh root; \ chsh -s /bin/zsh root
useradd -M -u 1000 -U -s /bin/zsh -d /home/hanez hanez; \
useradd -M -u 1001 -U -s /bin/bash -d /home/one one; \ RUN \
useradd -M -u 1000 -U -s /bin/zsh -d /home/hanez hanez;\
touch /home/hanez/.penv;\
chown -R 1000:1000 /home/hanez
WORKDIR .
RUN \
useradd -M -u 1001 -U -s /bin/bash -d /home/one one;\
useradd -M -u 1002 -U -s /bin/ash -d /home/two two useradd -M -u 1002 -U -s /bin/ash -d /home/two two
RUN mkdir /home/xxx
# This is obsolete since I use docker-compose for managing the container # This is obsolete since I use docker-compose for managing the container
ENTRYPOINT ["bash"] ENTRYPOINT ["ash"]

View file

@ -24,7 +24,7 @@ My plan is to switch from Docker to native Linux Containers at some time but I a
git clone git@git.xw3.org:hanez/rusty.git # (needs an account on git.xw3.org) git clone git@git.xw3.org:hanez/rusty.git # (needs an account on git.xw3.org)
cd rusty cd rusty
## Prepare the environment ## Prepare the environment (This is totally wrong! Give me some time... ;))
mkdir -p home/$USER mkdir -p home/$USER
chown $USER:$USER home/$USER chown $USER:$USER home/$USER
@ -48,7 +48,7 @@ If you do not configure your $HOME directories here, the container creates missi
Create a private key without a password. Create a private key without a password.
ssh-keygen -N "" -f home/$USER/.ssh/id_rsa ssh-keygen -N "" -f home/$USER/.ssh/ed25519
## Using docker compose ## Using docker compose