-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Docker image fixes #117
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
Closed
Closed
Docker image fixes #117
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
185d898
update docker files to make it run again
willemvd 85c4ef9
update docker files to make it run again (missed this one with git ad…
willemvd 67e7798
clean up
willemvd cfbdaba
move to phusion/baseimage
willemvd f2d020a
* use new FROM docker image which includes unprivileged running of se…
willemvd 8830d40
Merge branch 'phusion-baseimage'
willemvd a53069d
fixed some folder creation moments (user/my_init.d based instead of d…
willemvd b793023
OpenShift template for using Gitea (without PostgreSQL, but this is e…
willemvd e3b56d3
Merge remote-tracking branch 'upstream/master'
willemvd 28f7d3a
merge upstream/master into master
willemvd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,5 @@ config.codekit | |
.editorconfig | ||
.gitignore | ||
Dockerfile* | ||
vendor | ||
vendor/** | ||
gogs | ||
gitea | ||
bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM alpine:3.3 | ||
MAINTAINER [email protected] | ||
FROM willemvd/ubuntu-unprivileged-git-ssh:latest | ||
|
||
# Install system utils & Gogs runtime dependencies | ||
ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-amd64 /usr/sbin/gosu | ||
RUN chmod +x /usr/sbin/gosu \ | ||
&& apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata | ||
USER root | ||
|
||
ENV GITEA_CUSTOM /data/gogs | ||
COPY . /app/gitea/ | ||
WORKDIR /app/gitea/ | ||
|
||
COPY . /app/gogs/ | ||
WORKDIR /app/gogs/ | ||
RUN ./docker/build.sh | ||
# remove when using pre-build gitea | ||
RUN docker/prepare.sh && docker/build.sh && docker/cleanup.sh | ||
# end remove | ||
|
||
# Configure LibC Name Service | ||
COPY docker/nsswitch.conf /etc/nsswitch.conf | ||
RUN docker/init/10-setup-gitea.sh | ||
|
||
# Configure Docker Container | ||
VOLUME ["/data"] | ||
EXPOSE 22 3000 | ||
ENTRYPOINT ["docker/start.sh"] | ||
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"] | ||
USER git | ||
|
||
# persistent volume for the host ssh key and gitea data | ||
VOLUME ["/etc/ssh/keys", "/data"] | ||
|
||
EXPOSE 2222 3000 | ||
|
||
# Use baseimage-docker's init system. | ||
ENTRYPOINT ["/sbin/my_init", "--"] |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
apt-get remove -y build-essential libpam0g-dev golang software-properties-common | ||
apt autoremove -y | ||
apt-get clean | ||
apt-get autoclean | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
exec /app/gitea/gitea web 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
source /etc/profile | ||
|
||
# Create VOLUME subfolder | ||
for f in ${GITEA_CUSTOM}/data ${GITEA_CUSTOM}/conf ${GITEA_CUSTOM}/custom ${GITEA_CUSTOM}/log /data/git /data/ssh; do | ||
if ! test -d $f; then | ||
mkdir -p $f | ||
fi | ||
done | ||
|
||
|
||
if ! test -f ~git/.ssh/environment; then | ||
echo "GITEA_CUSTOM=${GITEA_CUSTOM}" > ~git/.ssh/environment | ||
chmod 660 ~git/.ssh/environment | ||
fi | ||
|
||
# Link volumed data with app data | ||
ln -sf ${GITEA_CUSTOM}/log /app/gitea/log | ||
ln -sf ${GITEA_CUSTOM}/data /app/gitea/data | ||
ln -sf ${GITEA_CUSTOM}/custom /app/gitea/custom | ||
|
||
# Backward Compatibility with Gogs Container v0.6.15 | ||
ln -sf /data/git /home/git | ||
|
||
chmod 0775 ${GITEA_CUSTOM} ${GITEA_CUSTOM}/custom ${GITEA_CUSTOM}/log ${GITEA_CUSTOM}/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p /etc/service/99-gitea | ||
|
||
cp /app/gitea/docker/gitea.sh /etc/service/99-gitea/run | ||
|
||
chmod -R 775 /etc/service/99-gitea | ||
chown -R git:root /etc/service/99-gitea | ||
|
||
export GITEA_CUSTOM=/data/gitea | ||
echo "export GITEA_CUSTOM=${GITEA_CUSTOM}" >> /etc/profile | ||
|
||
chown -R git:root /data /app/gitea | ||
chmod 0775 /data /app/gitea | ||
cp /app/gitea/docker/init/00-init-git-user-and-folders.sh /etc/my_init.d/99-gitea |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This opens up a huge security hole and should not, in any way, be accepted by the maintainers of Gitea.
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 agree, what's wrong with alpine?