just an idea...
This commit is contained in:
parent
26f54c0770
commit
6b3e4be0ef
2 changed files with 32 additions and 11 deletions
39
Dockerfile
39
Dockerfile
|
|
@ -1,4 +1,5 @@
|
|||
FROM alpine:3.22
|
||||
FROM alpine:latest
|
||||
#FROM rust:alpine
|
||||
|
||||
ENV \
|
||||
CARGO_HOME=/usr/local/cargo \
|
||||
|
|
@ -7,11 +8,15 @@ ENV \
|
|||
RUSTUP_HOME=/usr/local/rustup \
|
||||
TZ="Europe/Berlin"
|
||||
|
||||
WORKDIR /root
|
||||
WORKDIR .
|
||||
|
||||
# Do this because next steps require some software packages to be installed
|
||||
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)
|
||||
RUN \
|
||||
set -eux; \
|
||||
|
|
@ -37,16 +42,32 @@ RUN \
|
|||
|
||||
# Setup environment
|
||||
RUN \
|
||||
apk update; \
|
||||
apk upgrade --available; \
|
||||
apk add --no-cache bash byobu helix mc openssh shadow tmux vim zsh zsh-vcs neovim
|
||||
apk update;\
|
||||
apk upgrade --available;\
|
||||
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 \
|
||||
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; \
|
||||
chsh -s /bin/zsh root
|
||||
|
||||
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
|
||||
|
||||
RUN mkdir /home/xxx
|
||||
|
||||
# This is obsolete since I use docker-compose for managing the container
|
||||
ENTRYPOINT ["bash"]
|
||||
ENTRYPOINT ["ash"]
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
cd rusty
|
||||
|
||||
## Prepare the environment
|
||||
## Prepare the environment (This is totally wrong! Give me some time... ;))
|
||||
|
||||
mkdir -p 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.
|
||||
|
||||
ssh-keygen -N "" -f home/$USER/.ssh/id_rsa
|
||||
ssh-keygen -N "" -f home/$USER/.ssh/ed25519
|
||||
|
||||
## Using docker compose
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue