90 Commits (bc748f205afd2aa8a3243ff6170298f0194732df)

Author SHA1 Message Date
techknowlogick ec9331510c
Disable auto-migrate in docker container (#5730) 6 years ago
Julian f59bfe893a docker: stop modifying file permission before migrating database (#5707) 6 years ago
Pierre-Alexis Ciavaldini 0236856924 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
6 years ago
Moshi Binyamini 76060613ef Fix bug on modifying sshd username (#5624)
Should fix #5623
6 years ago
Lunny Xiao 6e114f6791 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
6 years ago
Fabian Braun d0f614a25b only chown directories during docker setup if necessary. Fix #4425 (#5064)
Signed-off-by: Fabian Braun <fabian-braun@mailbox.org>
6 years ago
Mura Li 25c49cf930 Update build tags for sqlite_unlock_notify (#5144) 6 years ago
Andrew Phillips b30f6b4099 Remove UsePrivilegeSeparation from the Docker sshd_config, see #2876 (#4722)
Signed-off-by: Andrew Phillips <theasp@gmail.com>
6 years ago
Tao Wang 823318bfbe Add missing path in the Docker app.ini template (#2181) 6 years ago
techknowlogick e2721b6190
Remove call to update certs (#4296) 6 years ago
Fluf b299d7bceb 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
6 years ago
techknowlogick ecfc401eaa 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
6 years ago
Jone Marius Vignes cb87f29b76 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.
6 years ago
Antoine GIRARD 0e26db8bcd 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
6 years ago
Piotr Orzechowski 7bab3d2fb1 Enable content trust when building image (#2972) 7 years ago
Antoine GIRARD dac0f14f34 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
7 years ago
Henrik Bengtsson 9bdce5d21b Launch Gitea with custom UID/GID for 'git' user (fixes #2286) (#2791) 7 years ago
Morlinest 529f9d03ce Fix ordering in app.ini and fix run mode option (#2829) 7 years ago
Tao Wang d545e32b56 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>
7 years ago
Tao Wang 41cc110e62 Use sqlite3 database as default for Docker image (#2182)
Signed-off-by: Tao Wang <twang2218@gmail.com>
7 years ago
Thomas Boerger c6b6a61bf1 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
8 years ago
Thomas Boerger 65d0426b91
Use su-exec instead of gosu, much smaller 8 years ago
Thomas Boerger 86aa8e413a
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>
8 years ago
Sandro Santilli b7263f31a5 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
8 years ago
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 8 years ago
rugk 28dc5bb566 Replace gogs.io http links with https version (#3386) 8 years ago
Unknwon 160956dd31 Update Docker README 8 years ago
Jean-Philippe Roemer bcd4adb3a0 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>
8 years ago
Jean-Philippe Roemer 69e00f9948 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
8 years ago
Unknwon ac53bb593d #2878 print error of JSON unmarshal and always returns a valid object 8 years ago
Mike 9d44cd79ee update README.md
minor grammar fix
8 years ago
Unknwon d320915ad2 Minor fix for #2710 8 years ago
Jean-Philippe Roemer db14949209 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
8 years ago
Jean-Philippe Roemer 7845075bd2 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
8 years ago
Unknwon 779bb890fa Minor docs update for #2605 8 years ago
Jean-Philippe Roemer f4bc9263d9 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
9 years ago
Unknwon 894946c319 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
9 years ago
Jean-Philippe Roemer 12c8953381 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
9 years ago
Unknwon a849ac0164 Merge pull request #2446 from jgsqware/develop
Add Docker Volume from 1.9
9 years ago
Jean-Philippe Roemer 9032bd097b 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
9 years ago
juliengarcia eb14fbf95f Add Docker Volume from 1.9 9 years ago
James Mills f36c82c3b3 Add an important note about mapping the ssh port on the container to the host 9 years ago
Ivan Marban 4ea75dfcbe Remove RSA1 keys as only SSH version 2 is used 9 years ago
Unknwon 9cd16c5b12 #1692 add organization APIs 9 years ago
Unknwon 351dfc95a9 prepare release 9 years ago
Unknwon 5d95ffe3eb #2155 The owner has reached maximum creation limit of 0 repositories 9 years ago
Unknwon b1a53f6d8e add quay.io as another Docker option 9 years ago
Unknwon e538ff2770 fix #1829 and fix #890 9 years ago
Jean-Philippe Roemer 3deddabfd8 Add `set -x` & `set -e` to docker/build.sh for better debugging 9 years ago
Jean-Philippe Roemer 0cbf56855a Update s6 path following package update 9 years ago