Skip to content

Conversation

@rhyslbw
Copy link
Member

@rhyslbw rhyslbw commented Mar 11, 2023

Context

It's possible for changes in package dependencies to remove the need for a local node_modules directory in cardano-services, but our existing workflows will use available cache, which are not invalidated by this scenario.

Resolves #626

Proposed Solution

  • This change ensure at least one build in CI checks we can reliably build the image. Note that omitting the target tells the Docker engine to build each stage.
  • No changes are needed to the Dockerfile, to resolve the issue reported in Unable to build Docker image - node_modules missing #626, as it appears we've since added dependencies that again require the local node_module directory, as I now see pg and pg-pool, which are non-dev dependencies, so the folder requires COPYing

It's possible for changes in package dependencies to remove the need for a local `node_modules`
directory in `cardano-services`, but our existing workflows will use available cache, which
are not invalidated by this scenario. This change ensure at least one build in CI checks we can
reliably build the image. Note that omitting the `target` tells the Docker engine to build each
stage.
@rhyslbw rhyslbw requested a review from a team March 11, 2023 11:56
Copy link
Member

@AngelCastilloB AngelCastilloB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case I cloned this branch in a clean VM and tried constructing the docker image (to make sure #626 is indeed no longer reproducible), works perfectly 😎. Being able to detect the error during CI will be useful

@rhyslbw rhyslbw requested a review from a team March 13, 2023 15:15
@rhyslbw rhyslbw merged commit c7e64d0 into master Mar 14, 2023
@rhyslbw rhyslbw deleted the fix/dockerfile-cardano-services-copy branch March 14, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to build Docker image - node_modules missing

4 participants