Commit 8fd2c025 authored by Matija Obreza's avatar Matija Obreza
Browse files

Docker build fix

-  mkdir: cannot create directory ‘/data’: Permission denied
parent 8db0379e
......@@ -2,6 +2,8 @@ FROM jetty:9.4.27-jre8
LABEL maintainer "Matija Obreza <matija.obreza@croptrust.org>"
USER root
ENV USER=jetty \
APP_DATA=/data \
JETTY_BASE=/var/lib/jetty/ \
......@@ -13,8 +15,15 @@ COPY webapps ${JETTY_BASE}/webapps
COPY validator.properties ${JETTY_BASE}/resources/validator.properties
RUN mkdir -p $APP_DATA \
&& chown ${USER}.${USER} ${APP_DATA}
&& chown ${USER}.${USER} ${APP_DATA} \
&& chmod go+rwx ${APP_DATA} \
# sh removes env vars it doesn't support (ones with periods)
&& find /docker-entrypoint.sh -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' {} \; \
# && cat /docker-entrypoint.sh \
&& find ${JETTY_BASE} -type f -exec ls -la {} \;
COPY ${GENESYS_WAR} ${JETTY_BASE}/webapps/validator.war
VOLUME /data
USER jetty
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment