Skip to content
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 installing node-prune #633

Merged
merged 1 commit into from
May 20, 2022
Merged

Conversation

machisuke
Copy link
Contributor

@machisuke machisuke commented May 19, 2022

Motivation and Context

Docker builds failed with current master branch.

➜ docker build .
[+] Building 2.4s (18/19)
 => [internal] load build definition from Dockerfile                                                                                                                                                             0.0s
 => => transferring dockerfile: 764B                                                                                                                                                                             0.0s
 => [internal] load .dockerignore                                                                                                                                                                                0.0s
 => => transferring context: 34B                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                                                2.2s
 => [internal] load metadata for docker.io/library/node:14                                                                                                                                                       2.2s
 => [internal] load build context                                                                                                                                                                                0.0s
 => => transferring context: 15.69kB                                                                                                                                                                             0.0s
 => [builder 1/7] FROM docker.io/library/node:14@sha256:42353ba2f129758dd5df19c6bcc3107d519436585467b231883b07f21336a484                                                                                         0.0s
 => [runtime 1/4] FROM docker.io/library/node:14-alpine@sha256:c9b8829068199346e2a9ae46f870bbb82ce44de6580321300bf3945d00dee0f1                                                                                  0.0s
 => CACHED [runtime 2/4] COPY package.json /action/package.json                                                                                                                                                  0.0s
 => CACHED [builder 2/7] COPY package.json yarn.lock ./                                                                                                                                                          0.0s
 => CACHED [builder 3/7] RUN yarn                                                                                                                                                                                0.0s
 => CACHED [builder 4/7] COPY src ./src                                                                                                                                                                          0.0s
 => CACHED [builder 5/7] COPY tsconfig.json tsconfig.json                                                                                                                                                        0.0s
 => CACHED [builder 6/7] RUN yarn                                                                                                                                                                                0.0s
 => CACHED [builder 7/7] RUN yarn build                                                                                                                                                                          0.0s
 => CACHED [runtime 3/4] COPY --from=builder dist /action/dist                                                                                                                                                   0.0s
 => CACHED [dependencies 3/5] RUN yarn --production                                                                                                                                                              0.0s
 => CACHED [dependencies 4/5] RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash                                                                                                    0.0s
 => ERROR [dependencies 5/5] RUN ./bin/node-prune                                                                                                                                                                0.1s
------
 > [dependencies 5/5] RUN ./bin/node-prune:
#18 0.132 /bin/sh: 1: ./bin/node-prune: not found
------
executor failed running [/bin/sh -c ./bin/node-prune]: exit code: 127

It's because install.goreleaser.com has gone.

➜ curl install.goreleaser.com
curl: (6) Could not resolve host: install.goreleaser.com

#InsertIssueNumberHere
none

Description

Update node-prune installing way.
I used the way described in https://github.com/tj/node-prune/blob/master/Readme.md

How Has This Been Tested?

With this PR, doker build success

➜ docker build . --no-cache
[+] Building 23.2s (20/20) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                             0.0s
 => => transferring dockerfile: 37B                                                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                                0.0s
 => => transferring context: 34B                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                                                1.2s
 => [internal] load metadata for docker.io/library/node:14                                                                                                                                                       1.2s
 => [internal] load build context                                                                                                                                                                                0.0s
 => => transferring context: 365B                                                                                                                                                                                0.0s
 => CACHED [runtime 1/4] FROM docker.io/library/node:14-alpine@sha256:c9b8829068199346e2a9ae46f870bbb82ce44de6580321300bf3945d00dee0f1                                                                           0.0s
 => CACHED [dependencies 1/5] FROM docker.io/library/node:14@sha256:42353ba2f129758dd5df19c6bcc3107d519436585467b231883b07f21336a484                                                                             0.0s
 => [dependencies 2/5] COPY package.json yarn.lock ./                                                                                                                                                            0.0s
 => [runtime 2/4] COPY package.json /action/package.json                                                                                                                                                         0.0s
 => [builder 3/7] RUN yarn                                                                                                                                                                                      12.7s
 => [dependencies 3/5] RUN yarn --production                                                                                                                                                                    18.5s
 => [builder 4/7] COPY src ./src                                                                                                                                                                                 0.0s
 => [builder 5/7] COPY tsconfig.json tsconfig.json                                                                                                                                                               0.0s
 => [builder 6/7] RUN yarn                                                                                                                                                                                       0.4s
 => [builder 7/7] RUN yarn build                                                                                                                                                                                 1.9s
 => [runtime 3/4] COPY --from=builder dist /action/dist                                                                                                                                                          0.0s
 => [dependencies 4/5] RUN curl -sf https://gobinaries.com/tj/node-prune | sh                                                                                                                                    2.1s
 => [dependencies 5/5] RUN node-prune                                                                                                                                                                            0.4s
 => [runtime 4/4] COPY --from=dependencies node_modules /action/node_modules                                                                                                                                     0.2s
 => exporting to image                                                                                                                                                                                           0.1s
 => => exporting layers                                                                                                                                                                                          0.1s
 => => writing image sha256:e8fcd82f602a5e3aee84af905c1e4a819ffe5a99cfd337ce0a2b35ab882c07e0                                                                                                                     0.0s

@machisuke
Copy link
Contributor Author

@P0lip hi, cloud you check this PR, please?

Copy link

@bobvanderlinden bobvanderlinden left a comment

Choose a reason for hiding this comment

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

I ran into the same problem and had the same fix as this PR 👍

@P0lip P0lip merged commit ff9de7e into stoplightio:master May 20, 2022
@machisuke machisuke deleted the fix_node_prune branch May 25, 2022 01:46
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.

3 participants