Skip to content

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
wants to merge 10 commits into from
Closed

Docker image fixes #117

wants to merge 10 commits into from

Conversation

willemvd
Copy link
Contributor

@willemvd willemvd commented Nov 8, 2016

Docker build was broken due to different naming of the artifact from Go, paths changed and glide has been removed.
This should fix these issues (haven't got time to properly test it all)

Signed-off-by: Willem van Dreumel ([email protected])

@codecov-io
Copy link

codecov-io commented Nov 8, 2016

Current coverage is 3.03% (diff: 100%)

Merging #117 into master will not change coverage

@@            master      #117   diff @@
========================================
  Files           33        33          
  Lines         8106      8106          
  Methods          0         0          
  Messages         0         0          
  Branches         0         0          
========================================
  Hits           246       246          
  Misses        7840      7840          
  Partials        20        20          

Powered by Codecov. Last update cf045b0...28f7d3a

@@ -21,3 +21,5 @@ ln -sf /data/git /home/git

chown -R git:git /data /app/gogs ~git/
chmod 0755 /data /data/gogs ~git/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these two lines be changed as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you'd have to update the Dockerfile as well then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this need a change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be named "gitea" instead of "gogs" ?

@xinity xinity added the type/enhancement An improvement of existing functionality label Nov 8, 2016
@xinity xinity self-assigned this Nov 8, 2016
@xinity xinity added this to the 1.0.0 milestone Nov 8, 2016
make build TAGS="sqlite cert pam"
go install

# Cleanup GOPATH & vendoring dir
rm -r $GOPATH /app/gogs/vendor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be /app/gitea/vendor ?

@xinity
Copy link
Contributor

xinity commented Nov 8, 2016

i think we should move out of the Dockerfile the build process
as @tboerger will build binaries, we'll just have to add them in the shipped IMAGE.
PR incoming in my case :)

@ghost
Copy link

ghost commented Nov 8, 2016

@Xinty Actually, the whole point of a Dockerfile is to allow the user to build the binary him/herself. We should not be putting binaries in there if we can build it ourselves.

@metalmatze
Copy link
Contributor

Not sure if I understand @LefsFlarey correctly. But what will happen is that everyone can simply run make buildon their machine and create a binary. Our CI Pipeline will then use the binary created by the same command and simply copy it into the docker image. No need to have Go inside the container. Just a binary.
Right @tboerger ?

@xinity
Copy link
Contributor

xinity commented Nov 8, 2016

Agree @metalmaze

@ghost
Copy link

ghost commented Nov 9, 2016

Well... I don't know. Building a binary for every OS has to be automated somehow.

@tboerger
Copy link
Member

tboerger commented Nov 9, 2016

It will be automated, the makefile tasks are already there, just need to add drone as ci

@lunny lunny removed the in progress label Nov 10, 2016
…rvices syslog-ng, cron and sshd (so it can run on OpenShift v3)

* building of gitea is still in the image creation it self, but can be simply be changed when using a pre-build artifact
* renamed all folder paths to gitea instead of gogs

run with:
docker run --rm -p 2222:2222 -p 3000:3000 -v /tmp/docker-ssh-keys:/etc/ssh/keys -v /tmp/docker-data:/data -u $randomHighUserId $buildNumber
# Conflicts:
#	docker/build.sh
# Conflicts:
#	Dockerfile
#	docker/build.sh
#	docker/s6/gogs/setup
@willemvd
Copy link
Contributor Author

Changed the whole docker image to be able to run it as unprivileged user (needed for some docker environments like OpenShift v3 which do not allow to run as root) and merged the current master into the pull request

@tboerger
Copy link
Member

I'm really not a fan of the current approach. I really dislike the switch away from Alpine.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 24, 2016
@@ -1,22 +1,22 @@
FROM alpine:3.3
MAINTAINER [email protected]
FROM willemvd/ubuntu-unprivileged-git-ssh:latest
Copy link
Contributor

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.

Copy link

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?

@stevenroose
Copy link

It should definitively be possible to build Gitea on an alpine container without too much hassle.

@tboerger
Copy link
Member

So we agree to build only on official images

@tboerger tboerger added status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Nov 28, 2016
@tboerger tboerger mentioned this pull request Nov 28, 2016
@tboerger
Copy link
Member

Should we take #288 in favor of this?

@tboerger
Copy link
Member

Thanks for the work, we have merged #288 now to properly build docker images.

@tboerger tboerger closed this Nov 29, 2016
@tboerger tboerger removed this from the 1.0.0 milestone Nov 29, 2016
@tboerger tboerger added issue/duplicate The issue has already been reported. and removed type/enhancement An improvement of existing functionality lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Nov 29, 2016
lunny added a commit to lunny/gitea that referenced this pull request Feb 7, 2019
* use dep instead of govendor

* remove example

* change dependenci github.com/Unknwon from 1.0 to master
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants