Skip to content

Create Dockerfile #14

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Create Dockerfile #14

wants to merge 1 commit into from

Conversation

naortalmor1
Copy link

No description provided.

Copy link

@demoargon demoargon bot left a comment

Choose a reason for hiding this comment

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

13 findings found with highest severity of high

@@ -0,0 +1,25 @@
FROM node:12
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Missing User Instruction
A user should be specified in the dockerfile, otherwise the image will run as root

RUN apk add --update curl

COPY requirements.txt /opt/dvga/
RUN pip install -r requirements.txt
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Pip install Keeping Cached Packages
When installing packages with pip, the '--no-cache-dir' flag should be set to make Docker images smaller

ARG TARGET_FOLDER=/opt/dvga
WORKDIR $TARGET_FOLDER/

RUN apk add --update curl
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Unpinned Package Version in Apk Add
Package version pinning reduces the range of versions that can be installed, reducing the chances of failure due to unanticipated changes

RUN apk add --update curl

COPY requirements.txt /opt/dvga/
RUN pip install -r requirements.txt
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Unpinned Package Version in Pip Install
Package version pinning reduces the range of versions that can be installed, reducing the chances of failure due to unanticipated changes

ARG TARGET_FOLDER=/opt/dvga
WORKDIR $TARGET_FOLDER/

RUN apk add --update curl
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Update Instruction Alone
Instruction 'RUN update' should always be followed by ' install' in the same RUN statement

ADD core /opt/dvga/core
ADD db /opt/dvga/db
ADD static /opt/dvga/static
ADD templates /opt/dvga/templates
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Add Instead of Copy
Should use COPY instead of ADD unless, running a tar file

@@ -0,0 +1,25 @@
FROM node:12
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Healthcheck Instruction Missing
Ensure that HEALTHCHECK is being used. The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working

COPY requirements.txt /opt/dvga/
RUN pip install -r requirements.txt

ADD core /opt/dvga/core
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Multiple RUN, ADD, COPY, Instructions Listed
Multiple commands (RUN, Copy, And) should be grouped in order to reduce the number of layers.

ADD static /opt/dvga/static
ADD templates /opt/dvga/templates

COPY app.py /opt/dvga
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Multiple RUN, ADD, COPY, Instructions Listed
Multiple commands (RUN, Copy, And) should be grouped in order to reduce the number of layers.

ARG TARGET_FOLDER=/opt/dvga
WORKDIR $TARGET_FOLDER/

RUN apk add --update curl
Copy link

Choose a reason for hiding this comment

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

Finding of type dockerfiles detected.
Apk Add Using Local Cache Path
When installing packages, use the '--no-cache' switch to avoid the need to use '--update' and remove '/var/cache/apk/*'

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.

1 participant