Запустите Docker-Compose Up Batabase Uniatiationalized ErrorJAVA

Программисты JAVA общаются здесь
Anonymous
Запустите Docker-Compose Up Batabase Uniatiationalized Error

Сообщение Anonymous »

Я действительно новый с темами Docker File и Docker-Compose ..
Я прочитал много учебника, но я не мог решить свою проблему ..
my dockerfile < /p>

Код: Выделить всё

# Use an OpenJDK Runtime as a parent image
FROM openjdk:21-jdk
# Set the working directory to /app
WORKDIR /app
# Copy maven executable to the image
COPY mvnw .
COPY .mvn .mvn

# Copy the pom.xml file
COPY pom.xml .

# Copy the project source
COPY ./src ./src
COPY ./pom.xml ./pom.xml

RUN chmod 755 /app/mvnw

RUN ./mvnw dependency:go-offline -B

RUN ./mvnw package
#RUN ls -al
ENTRYPOINT ["java","-jar","target/demo_app-0.0.1-SNAPSHOT.jar"]
< /code>
my docker-compose < /p>
services:
app:
image: 'postgres:latest'
build:
context: .
container_name: app-demo
depends_on:
- postgres

environment:
- POSTGRES_PASSWORD:secret
ports:
- '8090:8080'
restart: always

postgres:
image: 'postgres:latest'
container_name: test-postgres
environment:
- POSTGRES_DB:mydatabase
- POSTGRES_PASSWORD:secret
- POSTGRES_USER:testuser
ports:
- '5432:5432'
Свойства моего приложения

Подробнее здесь: https://stackoverflow.com/questions/796 ... ized-error

Вернуться в «JAVA»