Community maintained Docker config for the knot server

Add UID and GID arguments to Dockerfile #6

deleted
opened by ionchy.ca targeting main from ionchy.ca/knot-docker: main

This lets you specify the UID and GID of the git user during build. The repository and app directories are owned by this git user.

typo

another typo

I swear the Dockerfile itself is correct I am just typoing the README

0
by ionchy.ca 2 comments
expand 1 commit
Add UID and GID arguments to Dockerfile

I would still combine these into a single RUN line, joined with &&. Each command in a dockerfile creates a new layer in the image, which bloats this more than necessary. More of a best-practice than an actual problem.

So that would be joining all three of the groupadd, useradd, and openssl lines?

sign up or login to add to the discussion
1
by ionchy.ca 6 comments
expand 1 commit
Add UID and GID arguments to Dockerfile

Sorry for the duplicate PR with #4 and changeless resubmissions lol I'm experimenting with jujutsu and stacked PRs I thought editing the description in past commits would have them show up in the PR but I guess not. I've pasted them down below for reference:

  • #5: I couldn't push or pull from any repositories until I set -git-dir following the instructions in knot-hosting, so this adds the /etc/ssh/sshd_config.d/authorized_keys_command.conf file to rootfs.
  • #6: UID and GID args can now be set during build, so following the example command in the README should fix #2 by providing a UID and GID that exist on the host so that the directories owned by git in the container can be bind mounted on the host.

What is the use case you are trying to solve with that?

Oh, I am dumb, I didn't notice the issue #2.

@ionchy.ca This looks great! Just make sure to also add the UID and GID parameters to the environment in the docker compose as well for people building with Docker Compose.

I've updated the Docker Compose file and the README but I still don't know how to debug why resubmitting the PR doesn't work so I'm just going to create a new one

Ok, new PR created at #9

This pull has been deleted (possibly by jj abandon or jj squash)
sign up or login to add to the discussion
Labels

None yet.

Participants 4
AT URI
at://did:plc:ypsrm6ue6o5xk5kvbdhwtppm/sh.tangled.repo.pull/3ly6z4onsfx22