mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:25:50 +00:00
fix syntax
This commit is contained in:
parent
6e70bce0a7
commit
368ba55305
2 changed files with 31 additions and 20 deletions
|
@ -1,11 +1,31 @@
|
|||
# Not actually used by the devcontainer, but it is used by gitpod
|
||||
ARG VARIANT=17-bullseye
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
|
||||
ARG NODE_VERSION="none"
|
||||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
||||
ARG USER=vscode
|
||||
VOLUME /home/$USER/.m2
|
||||
VOLUME /home/$USER/.gradle
|
||||
ARG JAVA_VERSION=17.0.7-ms
|
||||
RUN sudo mkdir /home/$USER/.m2 /home/$USER/.gradle && sudo chown $USER:$USER /home/$USER/.m2 /home/$USER/.gradle
|
||||
RUN bash -lc '. /usr/local/sdkman/bin/sdkman-init.sh && sdk install java $JAVA_VERSION && sdk use java $JAVA_VERSION'
|
||||
# Build stage
|
||||
FROM eclipse-temurin:17-jdk-bullseye as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy Maven wrapper and POM
|
||||
COPY .mvn/ .mvn/
|
||||
COPY mvnw pom.xml ./
|
||||
|
||||
# Download dependencies
|
||||
RUN ./mvnw dependency:go-offline
|
||||
|
||||
# Copy source code
|
||||
COPY src ./src
|
||||
|
||||
# Build the application
|
||||
RUN ./mvnw package -DskipTests
|
||||
|
||||
# Run stage
|
||||
FROM eclipse-temurin:17-jre-bullseye
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the built artifact from builder stage
|
||||
COPY --from=builder /app/target/*.jar app.jar
|
||||
|
||||
# Container runs on port 8080
|
||||
EXPOSE 8080
|
||||
|
||||
# Set the startup command
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
|
9
.github/workflows/pipeline.yml
vendored
9
.github/workflows/pipeline.yml
vendored
|
@ -130,15 +130,6 @@ jobs:
|
|||
timeout-minutes: 10
|
||||
run: |
|
||||
set -eo pipefail
|
||||
|
||||
# Debug: List contents of current directory
|
||||
echo "Current directory contents:"
|
||||
ls -la
|
||||
|
||||
# Debug: Print working directory
|
||||
echo "Current working directory:"
|
||||
pwd
|
||||
|
||||
start_time=$(date +%s%N)
|
||||
docker build -t app:latest . --no-cache
|
||||
build_status=$?
|
||||
|
|
Loading…
Reference in a new issue