Open
Conversation
Exeloo
requested changes
Feb 24, 2026
| COPY bun.lock ./ | ||
| <% } %> | ||
|
|
||
| RUN <%= packageManager %> install --frozen-lockfile |
Member
|
|
||
| RUN <%= packageManager %> run build | ||
|
|
||
| CMD ["<%= packageManager %>", "start"] |
Member
There was a problem hiding this comment.
Run scripts without run command isn't available on npm
Suggested change
| CMD ["<%= packageManager %>", "start"] | |
| CMD ["<%= packageManager %>", "run", "start"] |
Comment on lines
+7
to
+11
| <% if (packageManager === 'pnpm') { %> | ||
| ENV PNPM_HOME="/pnpm" | ||
| ENV PATH="$PNPM_HOME:$PATH" | ||
| RUN npm install -g pnpm | ||
| <% } %> |
Member
There was a problem hiding this comment.
Missing corepack installation for pnpm
Comment on lines
+17
to
+27
| WORKDIR /app | ||
| COPY package.json ./ | ||
| <% if (packageManager === 'npm') { %> | ||
| COPY package-lock.json ./ | ||
| <% } else if (packageManager === 'yarn') { %> | ||
| COPY yarn.lock ./ | ||
| <% } else if (packageManager === 'pnpm') { %> | ||
| COPY pnpm-lock.yaml ./ | ||
| <% } else if (packageManager === 'bun') { %> | ||
| COPY bun.lock ./ | ||
| <% } %> |
Member
There was a problem hiding this comment.
Maybe it would be better to create a variable in the factory and use it here instead of this 4 branches condition
| applyTemplates({ | ||
| ...strings, | ||
| ...options, | ||
| dot: ".", |
| @@ -0,0 +1,28 @@ | |||
| { | |||
| "$schema": "http://json-schema.org/draft-07/schema", | |||
| "$id": "SchematicsNanoForgeBaseApplication", | |||
| }, | ||
| "docker": { | ||
| "factory": "./libs/docker/docker.factory#main", | ||
| "description": "Create a Main file for client or server.", |
|
|
||
| it("should create docker file with install command", () => { | ||
| const content = tree.readContent(`/${packageManager}-test-app/Dockerfile`); | ||
| expect(content).toContain(`RUN ${packageManager} install --frozen-lockfile`); |
Member
There was a problem hiding this comment.
This tests isn't valid anymore as npm will depreciate --frozen-lockfile in next version
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
creates a docker schema to generate a dockerfile
How do you test this PR?
e2e tests
closes #74