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-archtokarchuk/v1.17
parent
7c3e605698
commit
dac0f14f34
@ -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"] |
|
||||||
|
|
@ -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 |
|
@ -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) .
|
Loading…
Reference in new issue