2
0
Commit Graph

90 Commits

Author SHA1 Message Date
techknowlogick
161fb97ec3 Disable auto-migrate in docker container (#5730) 2019-01-17 22:31:14 -05:00
Julian
2206b92016 docker: stop modifying file permission before migrating database (#5707) 2019-01-12 11:14:01 -05:00
Pierre-Alexis Ciavaldini
82a54ad365 migrate database if app.ini found (#5290)
* migrate database if app.ini found

* replacing hard-coded user id by env variable

* Update per @zeripath's feedback
2019-01-05 13:16:38 -05:00
Moshi Binyamini
597f32fa7f Fix bug on modifying sshd username (#5624)
Should fix #5623
2019-01-02 17:42:33 -05:00
Lunny Xiao
d613d6bc80 add git protocol v2 support via SSH on Docker image (#5520)
* add git protocol v2 support via SSH on Docker image

* remove new layer on dockerfile
2018-12-11 12:20:04 -05:00
Fabian Braun
959ff31792 only chown directories during docker setup if necessary. Fix #4425 (#5064)
Signed-off-by: Fabian Braun <fabian-braun@mailbox.org>
2018-10-30 11:41:41 -04:00
Mura Li
9f53060fc1 Update build tags for sqlite_unlock_notify (#5144) 2018-10-23 19:47:59 +08:00
Andrew Phillips
a2955df10f Remove UsePrivilegeSeparation from the Docker sshd_config, see #2876 (#4722)
Signed-off-by: Andrew Phillips <theasp@gmail.com>
2018-08-16 01:58:12 +03:00
Tao Wang
a3247c75a5 Add missing path in the Docker app.ini template (#2181) 2018-07-03 20:44:46 -04:00
techknowlogick
e4d3322a76 Remove call to update certs (#4296) 2018-06-21 17:12:56 -04:00
Fluf
14ef830266 Add Environment Variables to Docker template (#4012)
* Add disable registration as an environment variable

for docker

* Add REQUIRE_SIGNIN_VIEW as env var to docker

* Add variables to template

* Update docker docs
2018-05-23 23:31:12 +08:00
techknowlogick
0b4e97f412 Allow Gitea to run as different USER in Docker (#3961)
* If using a different $USER then rename git user

* Chown based on $USER env

* Target only one part of passwd

* su-exec based on $USER

not a hardcoded value
2018-05-16 23:58:44 +08:00
Jone Marius Vignes
629cf5d068 Update certificates to enable self-signed certs (#3708)
Why:

* We are using self-signed ssl certificates for internal services, which results in failures when gitea tries to communicate through webhooks with these. We would like to enable gitea to be able to use these certificates without having to build custom docker images.

How

* We add the internal certificates to /usr/local/share/ca-certificates on the host
* We read-only mount /usr/local/share/ca-certificates from the host to /usr/local/share/ca-certificates in the container 
* We do a update-ca-certificates in the alpine container before starting gitea

This should have no consequence for users that do not have the need to handle self-signed certificates, as update-ca-certificates should be idempotent.
2018-03-25 13:47:06 +03:00
Antoine GIRARD
ada60b1a8f Docker multi-stage (#2927)
* Setup docker multi-stage and little sugar at it

* Make codacy happy ?

* Revert back to what the official docker documentation suggest

Codacy don't seems to follow https://docs.docker.com/engine/reference/builder/#maintainer-deprecated

* Update golang version
2018-03-12 11:59:13 +02:00
Piotr Orzechowski
c0ba1a7135 Enable content trust when building image (#2972) 2017-12-03 18:21:10 +08:00
Antoine GIRARD
cda6cbdaff Docker multi-arch base (#1985)
* Create docker/manifest/base.yml

serve as base for build docker image for most platform (386,amd64,arm,arm64)

* Add make task docker-multi-arch-push-manifest

To update references of a multi-arch image on docker registry.

* Use SED_INPLACE generic sed command

* Delete Dockerfile.aarch64

Delete Dockerfile.rpi

* Use gitea/gitea-base as base

and replace deprecated MAINTAINER by LABEL (https://docs.docker.com/engine/reference/builder/#maintainer-deprecated)

* Fix rebase

* Use sapk/gitea-base as base

* Split makefile for docker

* Fix version to v3.6

Could use in later version edge of alpine official library that support multi-arch for armhf.

* Remove sapk/gitea-base and use directly new official alpine multi-arch
2017-11-16 15:16:40 +02:00
Henrik Bengtsson
8875427597 Launch Gitea with custom UID/GID for 'git' user (fixes #2286) (#2791) 2017-11-05 10:40:31 +08:00
Morlinest
47fe66d532 Fix ordering in app.ini and fix run mode option (#2829) 2017-11-02 23:08:21 +02:00
Tao Wang
05dde9f729 Add environment variable support for Docker image (#2201)
* Add `gettext` dependencies as we need `envsubst` command;
* Modified s6's gitea setup script, instead of `cp` the template if no
`app.ini` exist, it will substitude the envvars and generate the new
`app.ini`;
* Make `/docker/etc/templates/app.ini` a template contains environment
variables;

Signed-off-by: Tao Wang <twang2218@gmail.com>
2017-10-31 16:55:46 +08:00
Tao Wang
59909060d0 Use sqlite3 database as default for Docker image (#2182)
Signed-off-by: Tao Wang <twang2218@gmail.com>
2017-07-26 15:21:23 +08:00
Thomas Boerger
b63a82d9a1 Fixing multiple docker issues (#386)
* Added stupid docker task to makefile

* Dropped unknown option PrintLastLog from docker ssh config

* OpenSSH should log to docker stdout

* Set random pw for docker git user, otherwise it is locked

* Stop using templates and public within docker
2016-12-15 17:16:55 +08:00
Thomas Boerger
f966873356 Use su-exec instead of gosu, much smaller 2016-11-28 17:16:13 +01:00
Thomas Boerger
744bce55c8 Restructured docker building
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 <tboerger@suse.de>
2016-11-28 14:13:18 +01:00
Sandro Santilli
d90e33d6df Replace GOGS with GITEA in variable names
Still use GOGS_WORK_DIR and GOGS_CUSTOM env variables
as a fallback if the equivalent GITEA_* are not set,
warning user about the need for change.

Does not change "gogs" to "gitea" in webhook type name
Because "gogs" hook type is part of the API (routes) and used
in templates...

Closes #87
2016-11-07 16:05:18 +01:00
Rémy Boulanouar
61ec6729e6 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
rugk
be909fcc1c Replace gogs.io http links with https version (#3386) 2016-08-05 17:35:40 -07:00
Unknwon
bf847d0f48 Update Docker README 2016-07-15 14:32:42 +08:00
Jean-Philippe Roemer
6f4f51723e Update docker/build.sh script to use glide & make (#3079)
* docker: update build script to use glide + make

- docker/build.sh will now use glide to fetch dependencies
- glide is built from source to keep compatibility with arm
  (no pre-prebuilt binary for arm)
- docker/build.sh will also now use the provided Makefile
  It will generate an error when trying to get git build has as we do
  not ship the 88mo .git directory during the build (should not cause
  any problem as the variable it sets was not set previously)

* docker: fix docker arm build

- drop gosu version back to 1.7 as gosu binary for armhf is broken
- see tianon/gosu#19

* docker: update gosu to 1.9

Signed-off-by: Jean-Philippe Roemer <jp@roemer.im>
2016-05-11 13:11:59 -04:00
Jean-Philippe Roemer
4b019a2a6b docker: update documentation for container options (#2965)
- Created a Container options section in `docker/README.md`
- Add documentation for SOCAT_LINK
- Move CROND documentation to the new section
2016-04-12 10:46:32 -04:00
Unknwon
103f4a045e #2878 print error of JSON unmarshal and always returns a valid object 2016-03-26 16:42:20 -04:00
Mike
7f2f831e4f update README.md
minor grammar fix
2016-02-28 21:17:19 -05:00
Unknwon
e0cec9452b Minor fix for #2710 2016-02-27 11:31:24 -05:00
Jean-Philippe Roemer
f783dd966a Update Docker REAMDE.md
- Remove the known issue about `.dockerignore` being ignored during DockerHub automated build as this has been fixed
- Added a note on the fact that we currently do no support building the container on RPi1
2016-02-26 17:07:31 +00:00
Jean-Philippe Roemer
fa71ee25f7 Dockerfile & Dockerfile.pi updates
- Upgrade of gosu to v1.7
- Change in docker/build.sh to use `--no-cache` to prevent APKINDEX creation when installing dev dependencies
- Manual upgrade of Alpine on Raspberry Pi when building to make sure the environment is the same as the standard Dockerfile
2016-02-25 20:43:40 +00:00
Unknwon
3d9fb6ab06 Minor docs update for #2605 2016-02-12 08:18:12 -05:00
Jean-Philippe Roemer
d18dc69ade Add the ability to run crond inside the Docker container
- Add the crond init script for s6
- Add the RUN_CROND configuration variable to setup crond
- Crond will not be run by default (hence the `down` file in the service directory)
- `start.sh` check if RUN_CROND = "true" || "1" and remove this file to tell s6 to run the initscript
- Resolves #2597
2016-02-12 02:48:55 +00:00
Unknwon
3988991a19 Merge pull request #2573 from prologic/add-note-wrt-ssh-on-docker#2409
Add an important note about mapping the ssh port on the container to the host
2016-02-06 20:22:43 -05:00
Jean-Philippe Roemer
d066972957 Update Dockerfile to update alpine to v3.3 & fix virtual package and repository pinning on RPi
- Dockerfile now uses alpine:3.3 as base
- Dockerfile.rpi now uses v3.3/community repository without pinning
- Go package is no longer fetched using repository pinning
- Fixes problem while using repository pinning & virtual package at the same time
2016-01-28 21:31:45 +00:00
Unknwon
1035581cb2 Merge pull request #2446 from jgsqware/develop
Add Docker Volume from 1.9
2016-01-26 13:45:24 -05:00
Jean-Philippe Roemer
bd873ba856 Update Dockerfile & build script and add /etc/nsswitch.conf:
- Add nsswitch.conf to configure LibC Name Service inside the container
- Change my email in the Dockerfile
- Update build script to install software as a `build-deps` virtual package so that adding a package to it will be automatically	removed at the end of the build script
2016-01-25 13:07:37 +00:00
juliengarcia
edecc03515 Add Docker Volume from 1.9 2016-01-20 16:54:38 +01:00
James Mills
d3bb09af2b Add an important note about mapping the ssh port on the container to the host 2016-01-19 22:24:40 -08:00
Ivan Marban
4859ec07e6 Remove RSA1 keys as only SSH version 2 is used 2016-01-06 10:26:37 +01:00
Unknwon
6f6c77a6cd #1692 add organization APIs 2015-12-17 02:28:47 -05:00
Unknwon
4480151e4c prepare release 2015-12-12 21:58:54 -05:00
Unknwon
3bd998fe21 #2155 The owner has reached maximum creation limit of 0 repositories 2015-12-11 15:11:13 -05:00
Unknwon
6835f52b0a add quay.io as another Docker option 2015-12-07 19:40:24 -05:00
Unknwon
4b54ceb402 fix #1829 and fix #890 2015-12-04 21:30:33 -05:00
Jean-Philippe Roemer
c31c9a56ab Add set -x & set -e to docker/build.sh for better debugging 2015-11-16 16:49:40 +00:00
Jean-Philippe Roemer
ffa11ce45c Update s6 path following package update 2015-11-16 16:48:09 +00:00