Skip to content

Commit 366ca88

Browse files
merge docker makefile into main one (#12289)
* merge docker makefile into main one * add readme for docker folder * don't include a file that doesn't exist anymore Co-authored-by: Lauris BH <[email protected]>
1 parent d489def commit 366ca88

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ XGO_VERSION := go-1.14.x
3030
MIN_GO_VERSION := 001012000
3131
MIN_NODE_VERSION := 010013000
3232

33+
DOCKER_IMAGE ?= gitea/gitea
34+
DOCKER_TAG ?= latest
35+
DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
36+
3337
ifeq ($(HAS_GO), GO)
3438
GOPATH ?= $(shell $(GO) env GOPATH)
3539
export PATH := $(GOPATH)/bin:$(PATH)
@@ -144,8 +148,6 @@ TEST_MSSQL_PASSWORD ?= MwantsaSecurePassword1
144148
.PHONY: all
145149
all: build
146150

147-
include docker/Makefile
148-
149151
.PHONY: help
150152
help:
151153
@echo "Make Routines:"
@@ -686,5 +688,14 @@ golangci-lint:
686688
fi
687689
golangci-lint run --timeout 5m
688690

691+
.PHONY: docker
692+
docker:
693+
docker build --disable-content-trust=false -t $(DOCKER_REF) .
694+
# support also build args docker build --build-arg GITEA_VERSION=v1.2.3 --build-arg TAGS="bindata sqlite sqlite_unlock_notify" .
695+
696+
.PHONY: docker-build
697+
docker-build:
698+
docker run -ti --rm -v $(CURDIR):/srv/app/src/code.gitea.io/gitea -w /srv/app/src/code.gitea.io/gitea -e TAGS="bindata $(TAGS)" LDFLAGS="$(LDFLAGS)" CGO_EXTRA_CFLAGS="$(CGO_EXTRA_CFLAGS)" webhippie/golang:edge make clean build
699+
689700
# This endif closes the if at the top of the file
690701
endif

docker/Makefile

Lines changed: 0 additions & 14 deletions
This file was deleted.

docker/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Gitea - Docker
2+
3+
Dockefile is found in root of repository.
4+
5+
Docker image can be found on [docker hub](https://hub.docker.com/r/gitea/gitea)
6+
7+
Documentation on using docker image can be found on [Gitea Docs site](https://docs.gitea.io/en-us/install-with-docker/)

0 commit comments

Comments
 (0)