TeamSpeak-Systems / teamspeak-linux-docker-images

docker build files for TeamSpeak servers
Other
116 stars 56 forks source link

Checksum check is not enforced in Dockerfile #75

Closed csware closed 3 years ago

csware commented 3 years ago

Because ; is used to concatenate commands for the RUN activity instead of && the docker image can be created even if the checksum test fails.

Solution: Better use && instead of ;

muenchow commented 3 years ago

Did test this assertion before posting? I am asking because, when looking at the relevant script, there is an initial set -e that should terminate the whole RUN if any of the commands fail.

RUN set -eux; \
    [...]
    wget "${TEAMSPEAK_URL}" -O server.tar.bz2; \
    echo "${TEAMSPEAK_CHECKSUM} *server.tar.bz2" | sha256sum -c -; \
    [...]
csware commented 3 years ago

Argh. You are right. (I spotted this issue in multiple Dockerfiles, but I oversaw the set -epart in this case.

Sorry for the noise.