-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove git describe code in Dockerfile
- Loading branch information
1 parent
6f966ca
commit 1b7f0cc
Showing
1 changed file
with
2 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |