Skip to content

Commit

Permalink
PostgreSQL support added to docker-compose.yml and Non-root user upda…
Browse files Browse the repository at this point in the history
…te included
  • Loading branch information
CesarAndrade007 committed Feb 29, 2024
1 parent 76365f7 commit bd8b139
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions oba/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ ARG UID=1000
ARG GROUP=oba_group
ARG USER=oba_user

RUN groupadd -g ${GID} ${GROUP} && useradd -m -u ${UID} -g ${GID} ${USER}
RUN groupadd -g $GID $GROUP && \
useradd -d /home/$USER -u $UID -m -s /bin/bash -g $GROUP $USER && \
chown -R $USER:$GROUP $CATALINA_HOME && \
mkdir -p /var/log/tomcat8 && \
chown -R $USER:$GROUP /var/log/tomcat8

USER $USER

# MySQL Connector
WORKDIR $CATALINA_HOME/lib
Expand Down Expand Up @@ -49,11 +55,4 @@ RUN jar xvf onebusaway-enterprise-acta-webapp-${OBA_VERSION}.war
RUN rm onebusaway-enterprise-acta-webapp-${OBA_VERSION}.war
COPY ./config/onebusaway-enterprise-acta-webapp-data-sources.xml ./WEB-INF/classes/data-sources.xml
RUN cp $CATALINA_HOME/lib/mysql-connector-j-8.3.0.jar ./WEB-INF/lib
RUN mv /oba/webapps/onebusaway-enterprise-acta-webapp $CATALINA_HOME/webapps

RUN chown -R ${USER}:${GROUP} ${CATALINA_HOME} \
&& chown -R ${USER}:${GROUP} ${CATALINA_HOME}/lib \
&& chown -R ${USER}:${GROUP} /oba/libs \
&& chown -R ${USER}:${GROUP} /oba/webapps

USER oba_user
RUN mv /oba/webapps/onebusaway-enterprise-acta-webapp $CATALINA_HOME/webapps

0 comments on commit bd8b139

Please sign in to comment.