-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Docker integration #288
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
Docker integration #288
Conversation
I have restructured the docker build process entirely, the binary gets built outside of the docker build command, now we are managing all dependencies with real Alpine packages and I have dropped features like socat or the cron daemon. Signed-off-by: Thomas Boerger <[email protected]>
In order to automatically build docker images I have re-enabled the docker building parts within our drone runs on every push to master and on every tag. Signed-off-by: Thomas Boerger <[email protected]>
I'd strongly advice against running |
I'm running |
Will it also run as a non root user aka docker run -u ? |
Is there a specific reason to use |
Yeah, |
I'm not sure if that is possible at all since daemons like openSSH are always started as root and it droppes the privileges later on. |
I'm sure it works for many users, but a stable product should never rely on an unspecified development version. I'm sure that this will be a deal breaker for users of Gitea. You don't want |
So I have replaced |
LGTM 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things
@@ -1,111 +0,0 @@ | |||
# Docker for Gogs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this file removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because multiple parts don't match anymore and instead of this file I would like to add a chapter to the docs and the example deployment repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
#!/bin/sh | ||
|
||
for FOLDER in /data/gitea/conf /data/gitea/log /data/git /data/ssh; do | ||
mkdir -p ${FOLDER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be mkdir -p "${FOLDER}" || true
no?
[bkc@bkc-ws] $ mkdir /usr
mkdir: cannot create directory ‘/usr’: File exists
[bkc@bkc-ws] $ echo $?
1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-p works fine like it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh nvm, I forgot to check with -p
😄
openssh \ | ||
tzdata && \ | ||
rm -rf \ | ||
/var/cache/apk/* && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why split short lines with few arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say personal style/taste.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough! If you check out the most popular official images at Docker Hub, the usual way to split lines are per command (except for packages). In my opinion it adds readability, but as you say, it's a matter of style & taste.
LGTM |
To get a real docker container up and running I have updated the entire build process which integrates perfectly into our Drone environment. This will obsolete #125 and #117. Thank you guys for the work over there.