Skip to content

Commit

Permalink
fix for api test files being owned by root on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed Nov 27, 2022
1 parent 0ffd827 commit 9b96e68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions apitester4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

FROM maven:3.8-jdk-11

ARG USERNAME=apitester
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --create-home --no-log-init --uid $USER_UID --gid $USER_GID -m $USERNAME

ADD . /opt/apitester
RUN cd /opt/apitester && mvn clean package
RUN chown -R apitester:apitester /opt/apitester

RUN cd /opt/apitester && mvn clean package
RUN find opt/apitester




2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ services:
volumes:
- ${OLS4_APITEST_OUTDIR:-./to_be_filled_by_script_outdir}:/mnt/out:rw
- ${OLS4_APITEST_COMPAREDIR:-./to_be_filled_by_script_comparedir}:/mnt/compare:rw
command: ["bash", "-c", "java -jar /opt/apitester/target/apitester-1.0-SNAPSHOT-jar-with-dependencies.jar --url http://ols4-backend:8080 --outDir /mnt/out --compareDir /mnt/compare > /mnt/out/apitester4.log"]
command: ["bash", "-c", "chown -R apitester:apitester /mnt && su -c \"java -jar /opt/apitester/target/apitester-1.0-SNAPSHOT-jar-with-dependencies.jar --url http://ols4-backend:8080 --outDir /mnt/out --compareDir /mnt/compare > /mnt/out/apitester4.log\" apitester"]
depends_on:
- ols4-backend
links:
Expand Down

0 comments on commit 9b96e68

Please sign in to comment.