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

node used by http-server has vulnerabilities #58

Merged
merged 1 commit into from
Sep 10, 2022

Conversation

shankari
Copy link
Contributor

Switching to the standard node instead.

Since we are switching the base image, also copied over the other configurations from the Dockerfile at https://github.com/danjellesma/http-server/blob/master/Dockerfile

Note that we needed to set the WORKDIR before running npm i http-server, otherwise we get an error

 => ERROR [3/6] RUN npm i http-server                                                                    0.9s
------
 > [3/6] RUN npm i http-server:

Testing done: Builds

[+] Building 2.3s (12/12) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 257B                                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                            0.0s
 => => transferring context: 2B                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                                                                            2.0s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                                                  0.0s
 => [1/6] FROM docker.io/library/node:18-alpine@sha256:ee2abfe3336a66f7976233633484609299dc906a553079a48aaae18200ebe369                                                      0.0s
 => [internal] load build context                                                                                                                                            0.1s
 => => transferring context: 1.76kB                                                                                                                                          0.0s
 => CACHED [2/6] RUN mkdir -p /public                                                                                                                                        0.0s
 => CACHED [3/6] WORKDIR /public                                                                                                                                             0.0s
 => CACHED [4/6] RUN npm install -g npm@8.14.0 && npm i http-server                                                                                                          0.0s
 => [5/6] COPY client /public/client                                                                                                                                         0.0s
 => [6/6] COPY *.html /public/                                                                                                                                               0.0s
 => exporting to image                                                                                                                                                       0.1s
 => => exporting layers                                                                                                                                                      0.1s
 => => writing image sha256:7f0ab3d6bf511943763dc0efc7f7b664390ece4035c16fe94863a0f74db1f05c                                                                                 0.0s
 => => naming to docker.io/em-pub-dash-prod/frontend                                                                                                                         0.0s

Switching to the standard node instead.

Since we are switching the base image, also copied over the other configurations from the Dockerfile at
https://github.com/danjellesma/http-server/blob/master/Dockerfile

Note that we needed to set the WORKDIR *before* running `npm i http-server`, otherwise we get an error

```
 => ERROR [3/6] RUN npm i http-server                                                                    0.9s
------
 > [3/6] RUN npm i http-server:
```

Testing done: Builds

```
[+] Building 2.3s (12/12) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 257B                                                                                                                                         0.0s
 => [internal] load .dockerignore                                                                                                                                            0.0s
 => => transferring context: 2B                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine                                                                                                            2.0s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                                                  0.0s
 => [1/6] FROM docker.io/library/node:18-alpine@sha256:ee2abfe3336a66f7976233633484609299dc906a553079a48aaae18200ebe369                                                      0.0s
 => [internal] load build context                                                                                                                                            0.1s
 => => transferring context: 1.76kB                                                                                                                                          0.0s
 => CACHED [2/6] RUN mkdir -p /public                                                                                                                                        0.0s
 => CACHED [3/6] WORKDIR /public                                                                                                                                             0.0s
 => CACHED [4/6] RUN npm install -g npm@8.14.0 && npm i http-server                                                                                                          0.0s
 => [5/6] COPY client /public/client                                                                                                                                         0.0s
 => [6/6] COPY *.html /public/                                                                                                                                               0.0s
 => exporting to image                                                                                                                                                       0.1s
 => => exporting layers                                                                                                                                                      0.1s
 => => writing image sha256:7f0ab3d6bf511943763dc0efc7f7b664390ece4035c16fe94863a0f74db1f05c                                                                                 0.0s
 => => naming to docker.io/em-pub-dash-prod/frontend                                                                                                                         0.0s
```
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.

None yet

1 participant