You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README section Run with Docker, there are several problems:
the command to build the image is incorrect. The Dockerfile is not located in the project root but in the subdirectories of each modules. For example, the Dockerfile for building the registry service image can be found in product-plane-services/registry-server.
the example only demonstrates how to run a single service (i.e., the registry) and does not explain how to run the entire platform. It would be helpful to clarify this and include instructions on running multiple services together, such as the registry and policy services.
The command to run the container on Windows does not work because the --net host option behaves differently in WSL 2 compared to native Linux due to the virtualized nature of the WSL 2 network. This means that on Windows when using --net host, ports cannot be forwarded, and as a result, even if the container runs correctly, it is not accessible from the Windows host
The following instructions fix the problem mentioned above....
Build image
Build the Docker image of the application and run it.
Before executing the following commands change properly the value of arguments DATABASE_USERNAME, DATABASE_PASSWORD and DATABASE_URL. Reported commands already contains right argument values if you have created the database using the commands above.
On Windows replace localhost with host.docker.internal
Run application
Run the Docker image.
Note: Before executing the following commands
remove the argument --net host if the database is not running on localhost
replace --net host with --add-host=host.docker.internal:host-gateway if you are running the container on windows
MySql
docker run --name odmp-mysql-app -p 8001:8001 --add-host=host.docker.internal:host-gateway odmp-mysql-app
Postgres
docker run --name odmp-postgres-app -p 8001:8001 --add-host=host.docker.internal:host-gateway odmp-postgres-app
Another solution that works on both Windows and Linux is to use a shared network bridge between the two containers. These are the commands to run the registry on PostgreSQL...
In the README section Run with Docker, there are several problems:
product-plane-services/registry-server
.The following instructions fix the problem mentioned above....
Build image
Build the Docker image of the application and run it.
Before executing the following commands change properly the value of arguments
DATABASE_USERNAME
,DATABASE_PASSWORD
andDATABASE_URL
. Reported commands already contains right argument values if you have created the database using the commands above.MySql
docker build -t odmp-mysql-app . -f product-plane-services/registry-server/Dockerfile \ --build-arg DATABASE_URL=jdbc:mysql://localhost:3306/ODMREGISTRY \ --build-arg DATABASE_USERNAME=root \ --build-arg DATABASE_PASSWORD=root \ --build-arg FLYWAY_SCRIPTS_DIR=mysql
Postgres
docker build -t odmp-postgres-app . -f product-plane-services/registry-server/Dockerfile\ --build-arg DATABASE_URL=jdbc:postgresql://localhost:5432/odmpdb \ --build-arg DATABASE_USERNAME=postgres \ --build-arg DATABASE_PASSWORD=postgres \ --build-arg FLYWAY_SCRIPTS_DIR=postgresql
On Windows replace
localhost
withhost.docker.internal
Run application
Run the Docker image.
Note: Before executing the following commands
--net host
if the database is not running onlocalhost
--net host
with--add-host=host.docker.internal:host-gateway
if you are running the container on windowsMySql
Postgres
Another solution that works on both Windows and Linux is to use a shared network bridge between the two containers. These are the commands to run the registry on PostgreSQL...
docker network create odmp-network docker run --name odmp-postgres-db -d - --network odmp-network p 5432:5432 \ -e POSTGRES_DB=odmpdb \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres \ postgres:11-alpine docker build -t odmp-postgres-app . -f product-plane-services/registry-server/Dockerfile\ --build-arg DATABASE_URL=jdbc:postgresql://odmp-postgres-db:5432/odmpdb \ --build-arg DATABASE_USERNAME=postgres \ --build-arg DATABASE_PASSWORD=postgres \ --build-arg FLYWAY_SCRIPTS_DIR=postgresql docker run --name odmp-postgres-app --network odmp-network -p 8001:8001 odmp-postgres-app
The text was updated successfully, but these errors were encountered: