Skip to content

Commit

Permalink
Docker multi-arch base (#1985)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sapk authored and lafriks committed Nov 16, 2017
1 parent 7c3e605 commit dac0f14
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 91 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM alpine:3.6

LABEL maintainer="The Gitea Authors"

EXPOSE 22 3000
Expand Down
43 changes: 0 additions & 43 deletions Dockerfile.aarch64

This file was deleted.

41 changes: 0 additions & 41 deletions Dockerfile.rpi

This file was deleted.

8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ else
endif

BINDATA := modules/{options,public,templates}/bindata.go
DOCKER_TAG := gitea/gitea:latest
GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
GOFMT ?= gofmt -s

Expand Down Expand Up @@ -56,6 +55,8 @@ else
endif
endif

include docker/Makefile

.PHONY: all
all: build

Expand Down Expand Up @@ -229,11 +230,6 @@ build: $(EXECUTABLE)
$(EXECUTABLE): $(SOURCES)
$(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

.PHONY: docker
docker:
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)" webhippie/golang:edge make clean generate build
docker build -t $(DOCKER_TAG) .

.PHONY: release
release: release-dirs release-windows release-linux release-darwin release-copy release-check

Expand Down
11 changes: 11 additions & 0 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Makefile related to docker

DOCKER_IMAGE ?= gitea/gitea
DOCKER_TAG ?= latest
DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)


.PHONY: docker
docker:
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)" webhippie/golang:edge make clean generate build
docker build -t $(DOCKER_REF) .

0 comments on commit dac0f14

Please sign in to comment.