Closed tschaffter closed 1 year ago
@rrchai I realize now that the issue is actually a limitation that I described in the section Future Work of the the PR #1302.
- There is a small risk that not all Docker images will be built when executing a container.
- Image build dependency is defined by the Nx graph.
- Container dependency is defined in the Docker Compose file (
depends_on
).- Ideally, the knowledge of which images must be built should match the images needed to run the containers, i.e. building the image should be done with Docker Compose.
- Building docker images for Spring boot add is a multi-command process and is not as simple as building an image from a Docker file. I don't know yet whether this would be an issue if we want to trigger the image build from the Docker Compose files.
There are two options:
I don't know if Option 2 is possible as we have a few projects that need a multi-command process to build their image. It doesn't look like we can specify a custom command as part of the build docker compose property, which I would have used otherwise to run nx build-image <project>
.
Is there an existing issue for this?
What projects are you seeing the problem on?
OpenChallenges
Current behavior
The issue happens when starting from a clean environment where even images have been removed. Starting the app then leads to the following issue:
Expected behavior
The image
sagebionetworks/openchallenges-vault
should be built as part of the deployment process, then successfully started.Anything else?
Rang experienced this issue too when deploying the app on the new EC2 instance.
Commit ID
eb135fc
Are you developing inside the dev container?
Code of Conduct