Commit Graph

63 Commits (e461f0854f451c4bbca15007696278aa6435535c)

Author SHA1 Message Date
Antoine GIRARD 7cb22d6439
Revert "Dockerfile: Support socat use cases (#13208)" (#13369)
This reverts commit ff50274ff3.
2020-10-31 15:19:41 +02:00
Begley Brothers (Development) ff50274ff3
Dockerfile: Support socat use cases (#13208)
* Dockerfile: Support socat use cases

In some contexts it is necessary to provide access to Gitea via TCP ports and unix sockets.
Gitea (`gitea web`) can be configured to listen for connections via unix-socket or TCP port, but not both.
When Gitea is installed to the host this limitation can be worked around by installing socat on the host.
When running Gitea from a container this limitation cannot be workaround.

Add socat to Gitea container.

* Removed version

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-21 21:41:49 -04:00
Antoine GIRARD 14e718695a
Update Dockerfile (#12922) 2020-09-27 18:52:22 -04:00
techknowlogick bd7d6a3d73
go1.15 (#12475)
* go1.15

* update makefile xgo version

* fix vet issue

* update docs to version of go in use

* add TODO for asyncpreemptoff

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-08-13 10:11:24 -04:00
Cirno the Strongest 594db7fb43
Fix missing CGO_EXTRA_FLAGS build arg for docker (#11782)
Co-authored-by: zeripath <art27@cantab.net>
2020-06-06 17:42:32 -04:00
techknowlogick a3b185d54c
Alpine 3.12 (#11720)
* increase alpine to 3.12

* Update .drone.yml
2020-06-03 16:32:51 -04:00
Cirno the Strongest c9187b8116
Add gnupg to Dockerfile (#11365)
Co-authored-by: zeripath <art27@cantab.net>
2020-05-10 23:41:34 +03:00
techknowlogick 2fa1078911
go 1.14 (#10467) 2020-03-20 10:29:31 -04:00
silverwind fa6ea60c55
Frontend build improvements, fix Fomantic build (#10576)
- add package-lock.json to webpack/fomantic prereqs making them always rebuild when dependencies change.
- remove FOMANTIC_EVIDENCE. It seemed better to just track a few output files instead.
- delete fomantic output files before build to prevent possible bugs in fomantic's build.
- resolve WEBPACK_SOURCES only once for performance
- reorder variables for clarity
- use clean-all in Dockerfile
- detect busybox for find syntax

Fixes: https://github.com/go-gitea/gitea/issues/10569
Fixes: https://github.com/go-gitea/gitea/issues/10565
Fixes: https://github.com/go-gitea/gitea/issues/10570
Fixes: https://github.com/go-gitea/gitea/issues/10568
2020-03-03 13:51:11 -06:00
techknowlogick d86e587186
alpine 3.11 (#9440) 2019-12-26 19:52:32 -05:00
Lunny Xiao 48be1889cd Fix latest docker image haven't include static files. (#9252)
* add warnging on docs

* fix docs
2019-12-05 12:18:28 -05:00
silverwind d9c67a8c90 Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git.
- Added version checks for both Go and Node.js.
- Overhauled the js/css make target to only run when needed.
- Merged the `generate` make target into `build` as per suggestion.

Fixes: https://github.com/go-gitea/gitea/issues/6782
Fixes: https://github.com/go-gitea/gitea/issues/9216
2019-12-05 11:41:38 +08:00
techknowlogick 3f5cdfe359 use go 1.13 (#8088)
* use go 1.13

* use go 1.13 in gomod file

* Update Makefile

* update swagger deps
2019-09-12 14:58:32 +03:00
Antoine GIRARD cd238bc415 build: use GOPROXY and disable download on some steps (#7745)
* build: use GOPROXY

* disable download vendor on some steps
2019-08-05 00:58:16 +03:00
techknowlogick 8db4541ecf
Alpine 3.10 (#7256) 2019-06-20 19:47:51 -04:00
Jakob Ackermann dab38c375d [docker] drop the docker Makefile from the image (#6507) 2019-05-05 22:49:32 -04:00
techknowlogick 96f1720d69
Use golang 1.12 to build in dockerfile (#6285) 2019-03-08 15:25:47 -05:00
techknowlogick 4a747aef7b
Upgrade alpine to 3.9 (#5909) 2019-02-05 17:53:23 -05:00
techknowlogick 5c13ba8d2e
Upgrade alpine to 3.8 (#5423) 2018-11-28 21:33:35 -05:00
Stanislav fa165621ed Update golang version in Dockerfile (#5246) 2018-11-01 12:43:17 -04:00
Mura Li 25c49cf930 Update build tags for sqlite_unlock_notify (#5144) 2018-10-23 19:47:59 +08:00
techknowlogick c3bbf43970 Fix docker build (#4358)
/app/gitea/gitea is the file, and /usr/local/bin is where the symlink will be located
2018-07-04 12:27:30 +03:00
Tao Wang 823318bfbe Add missing path in the Docker app.ini template (#2181) 2018-07-03 20:44:46 -04:00
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
2018-03-12 11:59:13 +02:00
Antoine GIRARD 23ffdf42c8 Update alpine to 3.7 (#3121) 2017-12-10 10:50:50 +08:00
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
2017-11-16 15:16:40 +02:00
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>
2017-10-31 16:55:46 +08:00
Bo-Yi Wu 68674649df Add maintainer label for docker file (#2658)
* Add maintainer label for docker file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-05 03:41:10 -05:00
Jon Davies fb1ed5de94 Dockerfile: Updated alpine image to 3.6. (#2486)
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2017-09-13 14:37:42 +08:00
Pontus Leitzler 2282e24028 Use /dev/urandom to create random password (#2298)
* Make sure generated password is random

Use /dev/urandom to get a 32 char password

* Make sure generated password is random

Use /dev/urandom to generate 32 char password

* Make sure generated password is random
2017-08-13 14:18:05 +08:00
Lunny Xiao 8fd43f215c Revert "Reduce number of layer" (#2086)
This reverts commit 789188f13c.
2017-06-30 01:10:37 -05:00
Dryusdan 789188f13c Reduce number of layer (#2078)
Somes layer are created and aren't usefull, so I compress this :)
2017-06-30 08:58:57 +08:00
Daniel Wendler (@cassandra) 377acb9757 Realy don't cache apk index
Actualy the "-U --no-cache" effectivly is treated as --no-cache
was never specified:

/ # apk -U --no-cache add sed
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/1) Installing sed (4.2.2-r0)
Executing busybox-1.25.1-r0.trigger
OK: 4 MiB in 12 packages
/ # ls -la /var/cache/apk/
total 1004
drwxr-xr-x    1 root     root            70 May  8 11:08 .
drwxr-xr-x    1 root     root            29 Mar  3 11:20 ..
-rw-r--r--    1 root     root        732807 May  5 07:11 APKINDEX.c51f8f92.tar.gz
-rw-r--r--    1 root     root        293014 May  1 12:37 APKINDEX.d09172fd.tar.gz

So removing the "-U" fix this behavior.
2017-05-09 15:34:33 +02:00
Peter Dave Hello a503947fba Upgrade alpine to v3.5 in Dockerfile (#1633) 2017-05-05 08:47:20 +08:00
Peter Dave Hello 1562e9ab70 Refactor Dockerfile
1. Use `apk -U --no-cache add` instead of `apk update` + `apk add` +
manually cache clean up.
2. Separate package installation and user, group setup, the combination
to reduce a docker image layer didn't bring benefits here, only makes
Dockerfiles more complex.
2017-04-29 21:05:25 +02:00
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
2016-12-15 17:16:55 +08:00
Thomas Boerger 6598745f07 Copy gitea binary to docker from correct path (#325)
Signed-off-by: Thomas Boerger <tboerger@suse.de>
2016-12-01 18:53:26 +08:00
Thomas Boerger d7dea676fd
Added -S flag to addgroup command within Dockerfiles 2016-11-28 17:37:31 +01:00
Thomas Boerger 4b0abdae9e
Replaced edge with 3.4 for the alpine base image 2016-11-28 17:23:22 +01:00
Thomas Boerger 972ce6b791
Replaced shadow with addgroup and adduser 2016-11-28 17:22:22 +01:00
Thomas Boerger 65d0426b91
Use su-exec instead of gosu, much smaller 2016-11-28 17:16:13 +01:00
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>
2016-11-28 14:13:18 +01:00
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
2016-11-07 16:05:18 +01:00
Andrey Arapov 6a98e7d914 docker: Support timezones (#3262) 2016-07-15 10:55:05 +08:00
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>
2016-05-11 13:11:59 -04:00
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
2016-02-25 20:43:40 +00:00
Muh Muhten 5609585ec1 update alpine package dependencies
- s6 is in main in 3.3, so we no longer need to mangle the repos file
- official image is periodically updated, so it's not preferred to do
  upgrades downstream (usually harmless, but inelegant)
- apk-tools in 3.3 supports --no-cache to avoid leaving the APKINDEX
  files in the image
2016-02-19 23:07:20 -05:00
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
2016-01-28 21:31:45 +00:00
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
2016-01-25 13:07:37 +00:00
Jean-Philippe Roemer 0cbf56855a Update s6 path following package update 2015-11-16 16:48:09 +00:00