ocket8888 commented on a change in pull request #6532: URL: https://github.com/apache/trafficcontrol/pull/6532#discussion_r813402191
########## 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: Oh it's not just Windows. I actually first noticed it using `sh` in Alpine containers. They don't have `UID` or `USER` set in the execution environment, although `id -u` outputs correctly. It's not a problem with `sh`, either. `sh` in CentOS containers has it set. Using `zsh` on Pop!_OS seems to set `USER` in the environment, but only makes `UID` available as a shell variable, not actually exported to the environment. It seems to just be a personal choice by the OS whether or not to set those by default in new shell sessions. -- 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]
