First final preview... :)
This commit is contained in:
parent
ca295910ca
commit
436cbb2328
2 changed files with 33 additions and 17 deletions
23
Dockerfile
23
Dockerfile
|
|
@ -2,14 +2,6 @@ FROM rust:latest
|
||||||
ENV TZ="Europe/Berlin"
|
ENV TZ="Europe/Berlin"
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
RUN apt update -y
|
|
||||||
RUN apt dist-upgrade -y
|
|
||||||
RUN apt install -y apt-utils build-essential 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 git clone --branch v1.1.0 --single-branch https://github.com/microsoft/edit.git edit
|
#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 cargo build --manifest-path /home/rust-docker/edit/Cargo.toml --profile dev
|
||||||
#RUN cp /home/rust-docker/edit/target/release/edit /usr/bin/
|
#RUN cp /home/rust-docker/edit/target/release/edit /usr/bin/
|
||||||
|
|
@ -18,13 +10,22 @@ RUN useradd -M -u 1000 -U -s /bin/zsh -d /home/hanez hanez
|
||||||
#RUN cargo build --manifest-path /home/rust-docker/gurk/Cargo.toml --profile release
|
#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 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 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 cargo build --manifest-path /root/helix/Cargo.toml --profile release
|
||||||
#RUN cp /root/helix/target/release/hx /usr/bin/
|
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 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 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 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"]
|
ENTRYPOINT ["bash"]
|
||||||
|
|
||||||
|
|
|
||||||
27
README.md
27
README.md
|
|
@ -1,11 +1,26 @@
|
||||||
# My Rust environment in a Docker container
|
# My Hack environment in a Docker container
|
||||||
|
|
||||||
sudo su -
|
The container actually is based on rust:latest which itself is based on Debian (Bookworm). Maybe I will switch to the Debian image, or better switch to an Alpine based image in the future. Actually I prefer the Debian image because it makes it more flexible to me because sometimes I need the GNU libc to compile programs.
|
||||||
cd /home
|
|
||||||
git clone https://git.xw3.org/hanez/rust-docker
|
Why the name "rusty"? Because it is based on some earlier Docker stuff I made for compiling Rust code... And rusty just sounds cool.
|
||||||
|
|
||||||
|
My plan is to switch from Docker to native Linux Containers at some time but I am faster in building the prototype using Docker... ;)
|
||||||
|
|
||||||
|
## Get the code
|
||||||
|
|
||||||
|
git clone https://git.xw3.org/hanez/rusty
|
||||||
or
|
or
|
||||||
git clone git@git.xw3.org:hanez/rust-docker.git
|
git clone git@git.xw3.org:hanez/rusty.git
|
||||||
cd rust-docker
|
cd rusty
|
||||||
|
|
||||||
|
## Using docker compose
|
||||||
|
|
||||||
|
docker compose build
|
||||||
|
docker compose up -d
|
||||||
|
docker attach rusty
|
||||||
|
|
||||||
|
## Using the Dockerfile only (less comfortable and without shared directories)
|
||||||
|
|
||||||
docker build -t rusty .
|
docker build -t rusty .
|
||||||
docker run -it --entrypoint /bin/bash rusty
|
docker run -it --entrypoint /bin/bash rusty
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue