Commit graph

85 commits

Author SHA1 Message Date
Loïc Dachary
b0250fd533
[CI] implementation: forgejo container images
(cherry picked from commit dd1971d4e6)
(cherry picked from commit 3981dbaf8c0dd74b0e82a7afc36809998ac775a2)
(cherry picked from commit 8dff3cc2d1a51980439e9ca8f1cad592403c558e)
(cherry picked from commit e7673e5d2237733e4e17b9386c4bb25bb88fe2e2)
(cherry picked from commit 326174064ba6dbd379ea82e9643e23fe684ad96f)
(cherry picked from commit eb769dbde4fb0d7a8a4bd74b6bcdf1f1f180f840)
(cherry picked from commit 335829ade20a187c7fd423909231d198a59545bd)
(cherry picked from commit 5e8e4f549d2224a00387764e93fdbde34e324c3d)

Conflicts:
	Dockerfile
	Dockerfile.rootless
(cherry picked from commit b777fc91d0ba5b1a061bd9cc57c4818a3357b42a)
(cherry picked from commit 02cda642ec7ce2b69de7f0ff4fb4f0d70941f54e)
(cherry picked from commit 96ef93f3bc1b618831f04e1ae5d5c7c74e2ed36c)
(cherry picked from commit aa424551f24364dd43d9b7739b723bb1d914eeaf)

Conflicts:
	Dockerfile
	Dockerfile.rootless
(cherry picked from commit e54fa86e4904047e5670e68a9dd89e76530564a4)
(cherry picked from commit 043fa6d6649272f14a65ee2c9cac15b090e66bc9)
(cherry picked from commit 805b16248015e8d7ab8c4f514969cff333d432c8)
(cherry picked from commit 86bf362a3c)
(cherry picked from commit 13e0007959fb5e2496b3bbec916036bd2a05a558)
(cherry picked from commit 00ff6f7cb3c54ae3a8ed2069b0dd0dddd98e7e6e)
(cherry picked from commit 95c7d8e883da495facfbac39db55b5b710ea25a7)
(cherry picked from commit fb033d2bb613c34b7f61c2bad14136f8f110081e)
(cherry picked from commit 1147910a552db9fdf7f4ef0a35e9b1d2405b0e69)
(cherry picked from commit 6590b6e99c9c31389f6b948976fba3fea8da7eb7)
(cherry picked from commit 78938113e4908df1d1e5181c1aa7605e7bc5747d)
(cherry picked from commit 57338224f172e30a72f03f565aa47876e1213e77)
(cherry picked from commit 4266cbcdd415de2deaea8620fe9b7b53866171ba)
(cherry picked from commit bdc766a5a2304fc1826649ac747a2724fed6e7ab)
(cherry picked from commit 6fb9ad85046fedf381a948906841098eb4ac010f)
(cherry picked from commit c4e6383240c4188fd65bf751aaf8f38466fe60e7)
(cherry picked from commit 490fa55b3abab2450073bc2358893687a06305cc)
(cherry picked from commit 802c8e72be88b342d3a285cd76a4d3207813d54f)
(cherry picked from commit 2b1efe20303be52f7ce142bafe48228822a1350c)
(cherry picked from commit fdcdd7389adafc25a158fc510256039e8f98bb2d)
(cherry picked from commit b9ae491650c7b8008149cda504439f092ba019ea)
(cherry picked from commit e7867c6512957822e6b9fde3dab2288714481f72)
(cherry picked from commit 0a43263fa6ad3dd7c20f7a7a8a60720d2a2ab7ea)
(cherry picked from commit 64bb6b89820d2202489151a84e00b62e8b580826)
(cherry picked from commit dcc1fd6292950fa0ce0cf932c62bc6e016d11b2f)
2023-11-06 14:11:29 +01:00
Patryk Krawaczyński
319414dd82
Dockerfile small refactor (#27757)
- Size and layer optimization,
- Maintaining consistency in definitions (comments, apk etc.),
2023-10-29 09:44:06 +08:00
techknowlogick
653e77fd22
bump go to 1.21 (#26608)
Co-authored-by: Giteabot <teabot@gitea.io>
2023-08-21 00:27:46 +02:00
Yevhen Pavlov
bed6885448
Update to Alpine 3.18 (#24700)
This pull request is for updating the base docker images to build with the latest version of Alpine.
2023-05-14 01:49:00 +00:00
techknowlogick
6148e38b86
Hardcode path to docker images (#23955)
Fix #23954

This allows for building on platforms that don't have docker hub as the
default container registry.
2023-04-07 02:41:49 -04:00
zeripath
43405c35f0
Add Bash and Zsh completion scripts (#22646)
This PR adds contrib scripts for bash and zsh completion.

Simply call:

```bash
source contrib/autocompletion/bash_autocomplete
```

or for Zsh:

```bash
source contrib/autocompletion/zsh_autocomplete
```

Signed-off-by: Andrew Thornton <art27@cantab.net>

---------

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-02-21 12:32:24 -05:00
techknowlogick
cfb1cb1168
update to build with go1.20 (#22732)
as title

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
2023-02-03 11:23:52 -05:00
flynnnnnnnnnn
350bc83d00
Update to Alpine 3.17 (#21904)
This pull request is for updating the base docker images to build with
the latest version of Alpine.
2022-12-02 11:23:26 -05:00
techknowlogick
be824890e4
Switch to building with go1.19 (#20695) 2022-08-07 12:25:03 -04:00
techknowlogick
0cbec3cd37
alpine 3.16 (#19797)
Co-authored-by: 6543 <6543@obermui.de>
2022-05-25 07:42:28 +03:00
techknowlogick
ed1d95c55d
use go1.18 to build gitea (#19099)
* use go1.18 to build gitea& update min go version to 1.17

* bump in a few more places

* add a few simple tests for isipprivate

* update go.mod

* update URL to https://go.dev/dl/

* golangci-lint

* attempt golangci-lint workaround

* change version

* bump fumpt version

* skip strings.title test

* go mod tidy

* update tests as some aren't private??

* update tests
2022-03-16 00:08:31 -04:00
Grzegorz Alibożek
4563148a61
Upgrade Alpine from 3.13 to 3.15 (#18050)
* Upgrade alpine to 3.15

* Add executability test to entrypoint for too old dockers

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update docker/rootless/usr/local/bin/docker-entrypoint.sh

Co-authored-by: zeripath <art27@cantab.net>
2022-01-19 16:55:17 -05:00
techknowlogick
d8ae769dda
update docker image to latest go version (#18048) 2021-12-20 22:11:10 -05:00
zeripath
7d0629adf8
Use shadowing script for docker (#17846)
Too many docker users are caught out by the default location for the
app.ini file being environment dependent so that when they docker exec
into the container the gitea commands do not work properly and require
additional -c arguments to correctly pick up the configuration.

This PR simply shadows the gitea binary using variants of the FHS
compatible script to make the command gitea have the default locations
by default.

Fix #14468
Reference #17497
Reference #12082
Reference #8941
... amongst others ...
Replace #17501

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-12-01 18:08:27 +00:00
zeripath
0277603878
chmod executables when copying to the docker (#17423)
Run chmod on the executables and the entrypoint when copying them to the
docker in dockerfile.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: delvh <dev.lh@web.de>
2021-10-25 20:32:03 +02:00
techknowlogick
274aeb3a9e
build with go1.17 (#16707)
Co-authored-by: Lauris BH <lauris@nix.lv>
2021-08-17 08:31:28 -04:00
techknowlogick
7b31aae414
revert to use alpine 3.13 (#16451)
Co-authored-by: zeripath <art27@cantab.net>
2021-07-16 09:54:39 +08:00
techknowlogick
061a8e7bb9
Alpine 3.14 released (#16170)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
2021-07-07 15:43:00 -04:00
Martin Michaelis
d576126286
Remove random password in Dockerfiles (#15362)
* Remove random password of git user in dockerfile

* Disable git user account in rootless dockerfile
2021-04-29 19:48:52 +02:00
techknowlogick
47f6a4ec3f
go1.16 (#14783) 2021-02-28 18:08:33 -05:00
Kyle D
61f347e349
Add environment-to-ini to docker image (#14762)
* Add environment-to-app.ini routine

* Call environment-to-ini in docker setup scripts

* Automatically convert section vars to lower case to match documentation

* Remove git patch instructions

* Add env variable documentation to Install Docker
2021-02-23 20:21:44 +01:00
techknowlogick
b708968694
upgrade to alpine 3.13 (#14343) 2021-01-20 05:21:01 +01:00
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