Unidata/tomcat-docker

Install gosu from package?

srstsavage opened this issue · 4 comments

The gosu 1.12 package seems to be available in tomcat:8.5-jdk11-openjdk. Any reason not to simplify the Dockerfile and just install gosu via the package?

I might be missing something obvious, but I just looked inside tomcat:8.5-jdk11-openjdk and I am not seeing it. Am I missing something obvious? Thanks.

Oh right, I don't mean that gosu is already installed in tomcat:8.5-jdk11-openjdk, but that it is easily installable via Debian/Ubuntu package:

$ docker build -t tomcat-with-gosu - <<EOF
FROM tomcat:8.5-jdk11-openjdk
RUN apt-get update -qq && apt-get install -qqy gosu           
EOF
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM tomcat:8.5-jdk11-openjdk
 ---> 9a795b3051bd
Step 2/2 : RUN apt-get update -qq && apt-get install -qqy gosu
 ---> Running in 82ba5c60f2c6
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package gosu.
(Reading database ... 12680 files and directories currently installed.)
Preparing to unpack .../gosu_1.12-1+b6_amd64.deb ...
Unpacking gosu (1.12-1+b6) ...
Setting up gosu (1.12-1+b6) ...
Removing intermediate container 82ba5c60f2c6
 ---> 69f6cab2c6d1
Successfully built 69f6cab2c6d1
Successfully tagged tomcat-with-gosu:latest
$ docker run --rm tomcat-with-gosu gosu --version
1.12 (go1.15.9 on linux/amd64; gc)

Sounds good. Would you like to submit a PR? (Ping @robertej09)

Yes, thanks, will do so shortly!