Skip to content

Commit

Permalink
Remove git describe code in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorgerhardt committed Nov 6, 2024
1 parent 6f966ca commit 1b7f0cc
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,20 @@ ENV PATH="/opt/gradle/latest/bin:${PATH}"
# Copy the project files
COPY . .

# Copy the git directory for git describe to work
COPY .git .git

# Initialize git and create a commit
# RUN git init && \
# git config --global user.email "[email protected]" && \
# git config --global user.name "Docker Build" && \
# git add . && \
# git commit -m "Initial commit" && \
# # Create a tag to ensure git describe works
# git tag -a v1.0.0 -m "Version 1.0.0"

# Run gradle build with more verbose output
RUN gradle build

# Run gradle shadowJar
RUN gradle shadowJar

# Move the built jar, which is named by git describe, to r5.jar
RUN GIT_DESCRIBE=$(git describe) && \
mv build/libs/r5-${GIT_DESCRIBE}-all.jar r5.jar
RUN mv build/libs/r5-*-all.jar r5.jar


FROM base AS runner
WORKDIR /app
COPY --from=builder /app/build/libs/r5.jar r5.jar
COPY --from=builder /app/r5.jar r5.jar
COPY analysis.properties.docker analysis.properties
RUN mkdir cache

EXPOSE 7070
CMD java -Xmx16g -cp r5.jar com.conveyal.analysis.BackendMain

0 comments on commit 1b7f0cc

Please sign in to comment.