Skip to content

Commit

Permalink
Change install dir to user home
Browse files Browse the repository at this point in the history
permissions set in java policy template are tailored
to these paths under the user home
  • Loading branch information
Phu2 committed Jun 10, 2024
1 parent a925d77 commit adbc52f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ RUN groupadd --gid $USER_GID $USERNAME \

USER $USERNAME

ARG INSTALL_DIR=/home/$USERNAME

## metafacture-core
WORKDIR /opt/metafacture-core
WORKDIR $INSTALL_DIR/metafacture-core
RUN git clone https://github.com/metafacture/metafacture-core.git .
# use master for now, not a specific version
# must match dependencies in project.clj
#RUN git checkout metafacture-core-6.0.0
RUN ./gradlew install

## metafacture-fix
WORKDIR /opt/metafacture-fix
WORKDIR $INSTALL_DIR/metafacture-fix
RUN git clone https://github.com/metafacture/metafacture-fix.git .
RUN git checkout 1.0.0
RUN ./gradlew install

## metafacture-playground
WORKDIR /opt/metafacture-playground
WORKDIR $INSTALL_DIR/metafacture-playground
COPY --chown="$USERNAME:$USERNAME" ./ .

COPY --chown="$USERNAME:$USERNAME" resources/.java.policy_move_to_home_dir /home/$USERNAME/.java.policy
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ RUN groupadd --gid $USER_GID $USERNAME \

USER $USERNAME

ARG INSTALL_DIR=/home/$USERNAME

## metafacture-core
WORKDIR /opt/metafacture-core
WORKDIR $INSTALL_DIR/metafacture-core
RUN git clone https://github.com/metafacture/metafacture-core.git .
# use master for now, not a specific version
# must match dependencies in project.clj
#RUN git checkout metafacture-core-6.0.0
RUN ./gradlew install

## metafacture-fix
WORKDIR /opt/metafacture-fix
WORKDIR $INSTALL_DIR/metafacture-fix
RUN git clone https://github.com/metafacture/metafacture-fix.git .
RUN git checkout 1.0.0
RUN ./gradlew install

## metafacture-playground
WORKDIR /opt/metafacture-playground
WORKDIR $INSTALL_DIR/metafacture-playground
RUN git clone https://github.com/metafacture/metafacture-playground.git .

COPY --chown="$USERNAME:$USERNAME" resources/.java.policy_move_to_home_dir /home/$USERNAME/.java.policy
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/opt/metafacture-playground
- .:/home/playground/metafacture-playground
ports:
- 8280:8280
- 9630:9630

0 comments on commit adbc52f

Please sign in to comment.