WSL2: No port forwarding to host problem (take 2)
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
version: '3' | |
services: | |
db: | |
image: "postgres:14.1" | |
ports: | |
- "5432:5432" | |
tmpfs: | |
- /var/lib/postgresql/data | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql | |
environment: | |
POSTGRES_DB: zhr | |
POSTGRES_PASSWORD: postgres | |
networks: | |
- hobbit | |
web: | |
build: . | |
ports: | |
- "8080" | |
expose: | |
- "8080" | |
networks: | |
- hobbit | |
depends_on: | |
- "db" | |
environment: | |
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/zhr | |
networks: | |
hobbit: | |
driver: bridge |
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
FROM gradle:7.3.0-jdk17 as builder | |
WORKDIR /app | |
COPY . /app/ | |
RUN gradle --no-daemon bootJar | |
FROM openjdk:17-slim | |
COPY --from=builder /app/build/libs/evaluation-task-LATEST.jar /opt/app.jar | |
EXPOSE 8080 | |
USER 65534:65534 | |
ENTRYPOINT java \ | |
-Djava.security.egd=file:/dev/urandom \ | |
-jar /opt/app.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment