From b952f3591c015fdd04feb5351909010a75130778 Mon Sep 17 00:00:00 2001 From: hanez Date: Sun, 8 Jun 2025 02:53:09 +0200 Subject: [PATCH] It grows... --- Dockerfile | 30 +++++++++++++----------------- Dockerfile.Debian | 32 -------------------------------- Dockerfile.Rust | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 49 deletions(-) delete mode 100644 Dockerfile.Debian create mode 100644 Dockerfile.Rust diff --git a/Dockerfile b/Dockerfile index 44035a1..bdc28bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,9 @@ ENV \ WORKDIR /root # Do this because next steps require some software packages to be installed -RUN apk add --no-cache alpine-sdk ca-certificates perl protobuf +RUN apk add --no-cache alpine-sdk ca-certificates perl -# Install Rust +# Install Rust (Copied from the official Rust Dockerfile) RUN set -eux; \ apkArch="$(apk --print-arch)"; \ case "$apkArch" in \ @@ -32,23 +32,19 @@ RUN set -eux; \ rustc --version; # Install Rust based applications -RUN git clone --branch v0.7.1 --single-branch https://github.com/boxdot/gurk-rs.git gurk -RUN cargo build --manifest-path /root/gurk/Cargo.toml --profile release -RUN cp /root/gurk/target/release/gurk /usr/bin/ +#RUN git clone --branch v0.7.1 --single-branch https://github.com/boxdot/gurk-rs.git gurk; \ +# cargo build --manifest-path /root/gurk/Cargo.toml --profile release; \ +# cp /root/gurk/target/release/gurk /usr/bin/ -RUN git clone --branch 25.01.1 --single-branch https://github.com/helix-editor/helix.git helix -RUN cargo build --manifest-path /root/helix/Cargo.toml --profile release -RUN cp /root/helix/target/release/hx /usr/bin/ +# Setup environment +RUN apk update; \ + apk upgrade --available; \ + apk add --no-cache bash helix mc openssh shadow tmux vim zsh zsh-vcs neovim -# System setup -RUN apk update -RUN apk upgrade --available -RUN apk add --no-cache bash mc openssh shadow tmux vim zsh zsh-vcs neovim - -RUN chsh -s /bin/zsh root -RUN useradd -M -u 1000 -U -s /bin/zsh -d /home/hanez hanez -RUN useradd -M -u 1001 -U -s /bin/bash -d /home/test test -RUN useradd -M -u 1002 -U -s /bin/bash -d /home/test test2 +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/test test; \ + useradd -M -u 1002 -U -s /bin/bash -d /home/test2 test2 # This is obsolete since I use docker-compose for managing the container ENTRYPOINT ["bash"] diff --git a/Dockerfile.Debian b/Dockerfile.Debian deleted file mode 100644 index 7abfddb..0000000 --- a/Dockerfile.Debian +++ /dev/null @@ -1,32 +0,0 @@ -FROM rust:latest -ENV TZ="Europe/Berlin" -WORKDIR /root - -RUN apt install protobuf-compiler - -#RUN git clone --branch v1.1.0 --single-branch https://github.com/microsoft/edit.git edit -#RUN cargo build --manifest-path /home/rust-docker/edit/Cargo.toml --profile dev -#RUN cp /home/rust-docker/edit/target/release/edit /usr/bin/ - -RUN git clone --branch v0.7.1 --single-branch https://github.com/boxdot/gurk-rs.git gurk -RUN cargo build --manifest-path /home/rust-docker/gurk/Cargo.toml --profile release -RUN cp /home/rust-docker/gurk/target/release/gurk /usr/bin/ - -RUN git clone --branch 25.01.1 --single-branch https://github.com/helix-editor/helix.git helix -RUN cargo build --manifest-path /root/helix/Cargo.toml --profile release -RUN cp /root/helix/target/release/hx /usr/bin/ - -#RUN git clone --branch v1.0.0 --single-branch https://github.com/FedericoBruzzone/tgt.git tgt -#RUN cargo build --manifest-path /home/rust-docker/tgt/Cargo.toml --profile release --features download-tdlib -#RUN cp /home/rust-docker/tgt/target/release/tgt /usr/bin/ - -RUN apt update -y -RUN apt dist-upgrade -y -RUN apt install -y apt-utils build-essential byobu git mc protobuf-compiler tmux vim zsh - -RUN chsh -s /bin/zsh root -RUN useradd -M -u 1000 -U -s /bin/zsh -d /home/hanez hanez -RUN useradd -M -u 1001 -U -s /bin/bash -d /home/test test - -ENTRYPOINT ["bash"] - diff --git a/Dockerfile.Rust b/Dockerfile.Rust new file mode 100644 index 0000000..570e29d --- /dev/null +++ b/Dockerfile.Rust @@ -0,0 +1,32 @@ +FROM rust:latest +ENV TZ="Europe/Berlin" +WORKDIR /root + +RUN apt install protobuf-compiler + +#RUN git clone --branch v1.1.0 --single-branch https://github.com/microsoft/edit.git edit; \ +# cargo build --manifest-path /home/rust-docker/edit/Cargo.toml --profile dev; \ +# cp /home/rust-docker/edit/target/release/edit /usr/bin/ + +#RUN git clone --branch v0.7.1 --single-branch https://github.com/boxdot/gurk-rs.git gurk; \ +# cargo build --manifest-path /home/rust-docker/gurk/Cargo.toml --profile release; \ +# cp /home/rust-docker/gurk/target/release/gurk /usr/bin/ + +RUN git clone --branch 25.01.1 --single-branch https://github.com/helix-editor/helix.git helix; \ + cargo build --manifest-path /root/helix/Cargo.toml --profile release; \ + cp /root/helix/target/release/hx /usr/bin/ + +#RUN git clone --branch v1.0.0 --single-branch https://github.com/FedericoBruzzone/tgt.git tgt; \ +# cargo build --manifest-path /home/rust-docker/tgt/Cargo.toml --profile release --features download-tdlib; \ +# cp /home/rust-docker/tgt/target/release/tgt /usr/bin/ + +RUN apt update -y; \ + apt dist-upgrade -y; \ + apt install -y apt-utils build-essential byobu git mc protobuf-compiler tmux vim zsh + +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/test test + +ENTRYPOINT ["bash"] +