diff options
-rw-r--r-- | Dockerfile | 1 | ||||
-rw-r--r-- | Dockerfile.aarch64 | 43 | ||||
-rw-r--r-- | Dockerfile.rpi | 41 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | docker/Makefile | 11 |
5 files changed, 13 insertions, 91 deletions
diff --git a/Dockerfile b/Dockerfile index 3db023ca3b..dba14d5794 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM alpine:3.6 - LABEL maintainer="The Gitea Authors" EXPOSE 22 3000 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 deleted file mode 100644 index 5c6746d584..0000000000 --- a/Dockerfile.aarch64 +++ /dev/null @@ -1,43 +0,0 @@ -FROM multiarch/alpine:aarch64-v3.6 - -LABEL maintainer="The Gitea Authors" - -EXPOSE 22 3000 - -RUN apk --no-cache add \ - su-exec \ - ca-certificates \ - sqlite \ - bash \ - git \ - linux-pam \ - s6 \ - curl \ - openssh \ - gettext \ - tzdata -RUN addgroup \ - -S -g 1000 \ - git && \ - adduser \ - -S -H -D \ - -h /data/git \ - -s /bin/bash \ - -u 1000 \ - -G git \ - git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd - -ENV USER git -ENV GITEA_CUSTOM /data/gitea - -COPY docker / -COPY gitea /app/gitea/gitea - -ENV GODEBUG=netdns=go - -VOLUME ["/data"] - -ENTRYPOINT ["/usr/bin/entrypoint"] -CMD ["/bin/s6-svscan", "/etc/s6"] - diff --git a/Dockerfile.rpi b/Dockerfile.rpi deleted file mode 100644 index 17ff4430e5..0000000000 --- a/Dockerfile.rpi +++ /dev/null @@ -1,41 +0,0 @@ -FROM multiarch/alpine:armhf-v3.6 - -LABEL maintainer="The Gitea Authors" - -EXPOSE 22 3000 - -RUN apk --no-cache add \ - su-exec \ - ca-certificates \ - sqlite \ - bash \ - git \ - linux-pam \ - s6 \ - curl \ - openssh \ - gettext \ - tzdata -RUN addgroup \ - -S -g 1000 \ - git && \ - adduser \ - -S -H -D \ - -h /data/git \ - -s /bin/bash \ - -u 1000 \ - -G git \ - git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd - -ENV USER git -ENV GITEA_CUSTOM /data/gitea -ENV GODEBUG=netdns=go - -VOLUME ["/data"] - -ENTRYPOINT ["/usr/bin/entrypoint"] -CMD ["/bin/s6-svscan", "/etc/s6"] - -COPY docker / -COPY gitea /app/gitea/gitea @@ -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 @@ -56,6 +55,8 @@ else endif endif +include docker/Makefile + .PHONY: all all: build @@ -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 diff --git a/docker/Makefile b/docker/Makefile new file mode 100644 index 0000000000..08e0b43849 --- /dev/null +++ b/docker/Makefile @@ -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) . |