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

Use WORKDIR instead of RUN. #86

Open
drobati opened this issue Nov 17, 2023 · 0 comments
Open

Use WORKDIR instead of RUN. #86

drobati opened this issue Nov 17, 2023 · 0 comments

Comments

@drobati
Copy link
Owner

drobati commented Nov 17, 2023

          <!-- autogenerated code comment 5D8BA5702BAE3F6A by ReviewGPT -->

The RUN mkdir /opt/app command is not necessary and can lead to an extra layer in your Docker image, which is not recommended for Docker best practices.

Instead of creating the directory with a RUN command, you can use the WORKDIR directive, which will create the directory if it does not exist. Replace the RUN mkdir /opt/app line with WORKDIR /opt/app.

Originally posted by @codereviewbot-ai[bot] in #85 (comment)

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

No branches or pull requests

1 participant