Wuhuuu...

This commit is contained in:
Johannes Findeisen 2025-06-08 04:05:24 +02:00
commit 26f54c0770
2 changed files with 13 additions and 11 deletions

View file

@ -13,7 +13,8 @@ WORKDIR /root
RUN apk add --no-cache alpine-sdk ca-certificates perl
# Install Rust (Copied from the official Rust Dockerfile)
RUN set -eux; \
RUN \
set -eux; \
apkArch="$(apk --print-arch)"; \
case "$apkArch" in \
x86_64) rustArch='x86_64-unknown-linux-musl'; rustupSha256='e6599a1c7be58a2d8eaca66a80e0dc006d87bbcf780a58b7343d6e14c1605cb2' ;; \
@ -35,14 +36,16 @@ RUN set -eux; \
# ...
# Setup environment
RUN apk update; \
RUN \
apk update; \
apk upgrade --available; \
apk add --no-cache bash byobu helix mc openssh shadow tmux vim zsh zsh-vcs neovim
RUN chsh -s /bin/zsh root; \
RUN \
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; \
useradd -M -u 1002 -U -s /bin/zsh -d /home/two two
useradd -M -u 1002 -U -s /bin/ash -d /home/two two
# This is obsolete since I use docker-compose for managing the container
ENTRYPOINT ["bash"]

View file

@ -44,6 +44,12 @@ I manage these Git based $HOME directories/repositories outside of the container
If you do not configure your $HOME directories here, the container creates missing configuration files.
### Create SSH key file
Create a private key without a password.
ssh-keygen -N "" -f home/$USER/.ssh/id_rsa
## Using docker compose
docker compose build
@ -52,10 +58,3 @@ If you do not configure your $HOME directories here, the container creates missi
You can stop the container by executing "exit" or by hiting ctrl+c when attached. You can always detache the container when hiting ctrl+p and then ctrl+q. This is useful if you have a screen or a tmux session runningin your container, or maybe some other applications.
## Using the Dockerfile only (less comfortable and without shared directories)
I recommend not to do it this way! You have been warned!
docker build -t rusty .
docker run -it --entrypoint /bin/bash rusty