Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to JDK 17, fix uid collision #98

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading