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

Using non root user #12

Merged
merged 14 commits into from
Nov 10, 2019
Merged

Using non root user #12

merged 14 commits into from
Nov 10, 2019

Conversation

Ilyes512
Copy link
Member

@Ilyes512 Ilyes512 commented Nov 6, 2019

The original PR and branch can be found here: #6 Since there were allot of changes I created a new branch and PR.

@Ilyes512 Ilyes512 added the wip label Nov 6, 2019
@hairyhenderson
Copy link
Contributor

@Ilyes512 Is there a reason you deleted the .dockerignore file? That's a useful one to prevent unnecessary files being copied into the build context...

@Ilyes512
Copy link
Member Author

Ilyes512 commented Nov 7, 2019

(Ow wtf... did not receive a email about your reply - only noticed it after checking out some boxes)

The reason is because I think the few KB's extra that it would need to send to the build context is not going to be noticeable. I can add it back.

edit:

Hmm, I can literally replace the old content of .dockerignore with:

*

@hairyhenderson
Copy link
Contributor

@Ilyes512 I'm not sure I understand why you added another docker-entrypoint.sh script in f0d0686 - how is that related to the volume thing?

@Ilyes512
Copy link
Member Author

Ilyes512 commented Nov 9, 2019

Not sure if this is the best solution, but the reason is to overwrite the /etc/caddy/Caddyfile using a (host)volume (this is usually only need while developing).

The original CMD was:

CMD [ "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile" ]

The only way to overwrite the Caddyfile is by creating a new image (with caddy as the base) and using COPY.

If you use an entrypoint script... any possible volumes will already have been mounted.

@hairyhenderson
Copy link
Contributor

@Ilyes512 I'm not sure why the two are related though, if you mount a new /etc/caddy/Caddyfile into the container with a volume, using CMD works just fine.

@Ilyes512
Copy link
Member Author

Ilyes512 commented Nov 9, 2019

After @hairyhenderson's double-check and my own check the commit that added the entrypoint file has been reverted.

@hairyhenderson
Copy link
Contributor

  • Write some examples/intructions

@Ilyes512 I think this piece ⬆️ could probably go in a separate PR. This one's good to go, and we'll be able to get a good image built sooner 😉

@Ilyes512 Ilyes512 removed the wip label Nov 10, 2019
@Ilyes512
Copy link
Member Author

@hairyhenderson you may merge it :)

@hairyhenderson hairyhenderson merged commit 3a04634 into master Nov 10, 2019
@hairyhenderson hairyhenderson deleted the using-non-root-user branch November 10, 2019 02:35
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