-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: error building with Dockerfile.contrib #261
Conversation
Pull Request Test Coverage Report for Build 493791282
💛 - Coveralls |
@larstobi Give this a check when you have time :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Trying |
Please don't merge this yet. I have some comments. |
@@ -11,8 +11,8 @@ RUN git clone -b ${Z2M_BRANCH} --depth 1 https://github.com/zwave-js/zwavejs2mqt | |||
|
|||
##### LOCAL SOURCE ##### | |||
FROM node:erbium-buster AS local-copy-src | |||
COPY --chown=node node-zwave-js /home/node/node-zwave-js | |||
COPY --chown=node zwavejs2mqtt /home/node/zwavejs2mqtt | |||
COPY --from=git-clone-src --chown=node /home/node/node-zwave-js /home/node/node-zwave-js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work when using local-copy-src since it will take the cloned source
@@ -26,23 +26,23 @@ RUN yarn install --network-timeout=${YARN_NETWORK_TIMEOUT} | |||
RUN yarn run build:full | |||
RUN yarn install --production --frozen-lockfile | |||
RUN for i in config core serial shared; do \ | |||
cd packages/$i && \ | |||
yarn version --no-git-tag-version --new-version $(yarn versions --json| \ | |||
jq -r '[.data."@zwave-js/'${i}'"]'[0])-$(git rev-parse --short HEAD) && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this is indented is that it's part of the previous command. I think that's a good thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this is indented is that it's part of the previous command. I think that's a good thing.
I think, this was by mistake due to auto-format on save which I seem to have missed.
@@ -26,23 +26,23 @@ RUN yarn install --network-timeout=${YARN_NETWORK_TIMEOUT} | |||
RUN yarn run build:full | |||
RUN yarn install --production --frozen-lockfile | |||
RUN for i in config core serial shared; do \ | |||
cd packages/$i && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not reducing indentation spaces from 4 to 2. It is also consistent with the other Dockerfile in this directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not reducing indentation spaces from 4 to 2. It is also consistent with the other Dockerfile in this directory.
You're right - this was slipped through as well due to auto-format on save.
@ahochsteger Thanks for taking the time to raise this PR! :-) I've investigated your changes, and unfortunately I cannot say that I agree. The reason you're getting that error is that you're not prefixing your docker command with The changes you've made breaks the Dockerfile when using Now, I understand that you would like to use this dockerfile without enabling docker BuildKit, and I've investigated with some ways by making another build stage, called "start", but I still haven't been able to make docker skip unused stages without BuildKit. If you can find a way that works for both SRC arguments (local and clone), without using BuildKit, then I'm all for it! |
@larstobi thangs for taking the time to review this PR. |
Great to hear that it works for you now! :-D |
Fixes the following error when building a docker image using Dockerfile.contrib:
Step 10/39 : COPY --chown=node node-zwave-js /home/node/node-zwave-js COPY failed: stat /var/lib/docker/tmp/docker-builder759222654/node-zwave-js: no such file or directory