OPENDAP / hyrax-docker

GNU Lesser General Public License v3.0
22 stars 12 forks source link

Error building 1.13.5 and 1.14.0 - chown: invalid user: ‘tomcat:tomcat’ #4

Closed lewismc closed 5 years ago

lewismc commented 6 years ago

Upon execution of the following command

docker-compose -f hyrax.yml build

I get the following

Step 17/28 : RUN set -e     && mkdir -p ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs     && chown -R tomcat:tomcat ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs     && chmod 700 ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs
 ---> Running in a21ffa599721
chown: invalid user: ‘tomcat:tomcat’
ERROR: Service 'olfs' failed to build: The command '/bin/sh -c set -e     && mkdir -p ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs     && chown -R tomcat:tomcat ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs     && chmod 700 ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs' returned a non-zero code: 1

The offending code is available at

# Fix ownership and access permissions
RUN set -e \
    && mkdir -p ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs \
    && chown -R tomcat:tomcat ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs \
    && chmod 700 ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs 

and

# Fix ownership and access permissions
RUN mkdir -p ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs && \
    chown -R tomcat:tomcat ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs && \
    chmod 700 ${CATALINA_HOME}/webapps/opendap/WEB-INF/conf/logs

Simply removing the offending lines solves the issue. Here is my environment

Docker version 18.06.1-ce, build e68fc7a docker-compose version 1.22.0, build f46880f

lewismc commented 6 years ago

Additionally, the following line results in an error

hyrax-1.14.0/olfs/entrypoint.sh#L71

https://github.com/OPENDAP/hyrax-docker/blob/ff00be63f808fc4130ee9d02b83dc25b68f826b4/hyrax-1.14.0/olfs/entrypoint.sh#L71

olfs_1  | /entrypoint.sh: line 71: ps: command not found
lewismc commented 5 years ago

@ndp-opendap I cannot reproduce the issue anymore after upgrading Docker on my Mac to the following

screen shot 2019-01-26 at 1 40 00 pm

I can confirm I was able to build and deploy the latest image without any issues.

jgallagher59701 commented 5 years ago

Good. Thanks for the update.

On Jan 26, 2019, at 14:40, Lewis John McGibbney notifications@github.com wrote:

Closed #4 https://github.com/OPENDAP/hyrax-docker/issues/4.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OPENDAP/hyrax-docker/issues/4#event-2099038573, or mute the thread https://github.com/notifications/unsubscribe-auth/AH8OKoarRd8XH0ItTcTPl9dq28LaJPfwks5vHMtRgaJpZM4Wl5Ti.

-- James Gallagher jgallagher@opendap.org