torrust-tracker icon indicating copy to clipboard operation
torrust-tracker copied to clipboard

Docker Security Overhaul: Consider using `docker.io/library/rust:slim-bookworm`

Open josecelano opened this issue 7 months ago • 0 comments

We use the docker image docker.io/library/rust:slim-bookworm; however, the slim version has fewer vulnerabilities and is smaller.

Image

Image

I think I once tried to use it but I got some errors.

I've just tried again and there is one error:

 => CANCELED [tester 4/7] RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | b  0.3s
 => [chef 3/4] RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash          0.1s
 => ERROR [chef 4/4] RUN cargo binstall --no-confirm cargo-chef cargo-nextest                                                                                                0.2s
------                                                                                                                                                                            
 > [chef 4/4] RUN cargo binstall --no-confirm cargo-chef cargo-nextest:
0.167 error: no such command: `binstall`
0.167 
0.167 help: a command with a similar name exists: `install`
0.167 
0.167 help: view all installed commands with `cargo --list`
0.167 help: find a package to install `binstall` with `cargo search cargo-binstall`
------
Containerfile:9
--------------------
   7 |     WORKDIR /tmp
   8 |     RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
   9 | >>> RUN cargo binstall --no-confirm cargo-chef cargo-nextest
  10 |     
  11 |     ## Tester Image
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo binstall --no-confirm cargo-chef cargo-nextest" did not complete successfully: exit code: 101

However, they could be easy to fix if we only need to install some tools.

josecelano avatar Apr 14 '25 17:04 josecelano