ocket8888 commented on a change in pull request #6532:
URL: https://github.com/apache/trafficcontrol/pull/6532#discussion_r813361816



##########
File path: dev/traffic_router/Dockerfile
##########
@@ -15,12 +15,17 @@ FROM alpine:latest AS trafficrouter-dev
 
 ENV TC=/root/go/src/github.com/apache/trafficcontrol
 VOLUME /root/go/src/github.com/apache/trafficcontrol
-ENV 
JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n"
 JAVA_HOME=/usr/lib/jvm/java-11-openjdk 
M2_HOME=/root/go/src/github.com/apache/trafficcontrol/.m2 
CATALINA_BASE=/opt/traffic_router
+ENV 
JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n"
 JAVA_HOME=/usr/lib/jvm/java-11-openjdk 
M2_HOME=/root/go/src/github.com/apache/trafficcontrol/.m2 
CATALINA_BASE=/opt/traffic_router TRAFFIC_MONITOR_HOSTS=trafficmonitor
 EXPOSE 3053:53/tcp 3053:53/udp 3080:80 3443:443 3333:3333 2222:3443 5005:5005
 
-RUN apk add --no-cache openjdk11 inotify-tools maven && ln -s 
/usr/lib/jvm/java-11-openjdk/bin/jdb /bin/jdb
+RUN apk add --no-cache openjdk11 inotify-tools maven tomcat-native openssl && 
ln -s /usr/lib/jvm/java-11-openjdk/bin/jdb /bin/jdb
 
 ADD 
https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.43/bin/apache-tomcat-9.0.43.tar.gz
 /opt/tomcat.tgz
+
+ARG USER
+RUN adduser -H -D ${USER}
+RUN chown -R ${USER} /opt /usr/share/java/ /root
+USER ${USER}

Review comment:
       I did it that way to avoid collisions in the UID from `adduser`. I think 
I just totally forgot that usernames are essentially syntactic sugar and that 
this won't mean anything. I'll try to get it working based on UID - but also be 
aware that not all shell/system combinations set the environment variable `UID` 
(or `USER` for that matter) and idk what to do about those systems.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to