Skip to content

Commit

Permalink
Upgrade to JDK 17, fix uid collision (#98)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Burson <[email protected]>
  • Loading branch information
jake-low and ljdelight authored Sep 10, 2024
1 parent d76f441 commit 046ede8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG TEMURIN_JDK_TAG=11
FROM docker.io/library/eclipse-temurin:${TEMURIN_JDK_TAG} as builder
ARG TEMURIN_JDK_TAG=17
FROM docker.io/library/eclipse-temurin:${TEMURIN_JDK_TAG} AS builder

ARG SBT_VERSION=1.9.7
ARG SBT_VERSION=1.9.9
ARG CACHEBUST=1
ARG GIT="maproulette/maproulette-backend"
ARG VERSION="LATEST"
Expand Down Expand Up @@ -43,16 +43,16 @@ RUN \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*
RUN \
groupadd -g 1000 maproulette && \
useradd --uid 1000 --gid 1000 --groups 0 --create-home --home-dir /MapRouletteAPI maproulette && \
groupadd -g 1001 maproulette && \
useradd --uid 1001 --gid 1001 --groups 0 --create-home --home-dir /MapRouletteAPI maproulette && \
chmod 0775 /MapRouletteAPI && \
chown -R 1000:0 /MapRouletteAPI
chown -R 1001:0 /MapRouletteAPI

COPY --from=builder --chown=1000:0 /MapRouletteAPI /MapRouletteAPI
COPY --from=builder --chown=1001:0 /MapRouletteAPI /MapRouletteAPI
USER maproulette
WORKDIR /MapRouletteAPI

COPY --chown=1000:0 setupServer.sh /MapRouletteAPI/setupServer.sh
COPY --chown=1000:0 application-overrides.conf /MapRouletteAPI/conf/application-overrides.conf
COPY --chown=1001:0 setupServer.sh /MapRouletteAPI/setupServer.sh
COPY --chown=1001:0 application-overrides.conf /MapRouletteAPI/conf/application-overrides.conf

ENTRYPOINT ["./setupServer.sh"]
1 change: 1 addition & 0 deletions api/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fi
echo "Building container image for MapRoulette API Version: $IMAGE_TAG, Repo: ${git[1]}"
docker build \
--pull \
--no-cache \
-t maproulette/maproulette-api:"${IMAGE_TAG}" \
--build-arg VERSION="${VERSION}" \
--build-arg GIT="${git[1]}" \
Expand Down

0 comments on commit 046ede8

Please sign in to comment.