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

chore: update Dockerfile #223

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Conversation

Aden-Q
Copy link
Contributor

@Aden-Q Aden-Q commented Dec 9, 2023

What does this PR?

Tidy Dockerfile. The WORKDIR directive will create the dir and switch the current working directory to it by default. According to the official docs:

The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile. If the WORKDIR doesn't exist, it will be created even if it's not used in any subsequent Dockerfile instruction.

Tested with docker build and docker run:

➜  godns git:(dockerfile-tidy) docker run -d --name godns --restart=always -v ./config.json:/config.json docker.io/library/godns
321bd5715676b4efa0d7146f6f89e01606120489aed3fbff0a1aba29bb4c6921

@TimothyYe TimothyYe merged commit f558d78 into TimothyYe:master Dec 19, 2023
1 check passed
@Aden-Q Aden-Q deleted the dockerfile-tidy branch December 19, 2023 03:54
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.

2 participants