Update hugo/Dockerfile, hugo/hugo.sh, hugo/Makefile, .gitlab-ci.yml files

Deleted borg/Dockerfile, borg/Makefile, borg/version, dendrite/Dockerfile, dendrite/Makefile, dendrite/entrypoint.sh, dendrite/version, minio/Dockerfile, minio/Makefile, minio/version, restic/Dockerfile, restic/Makefile, restic/version, watchdog/Dockerfile, watchdog/Makefile, watchdog/version files
This commit is contained in:
Adrien le Maire 2021-05-08 11:01:13 +00:00
parent 7c429a2fc9
commit 2f83b43b23
20 changed files with 78 additions and 205 deletions

View File

@ -20,18 +20,18 @@ element:
changes: changes:
- element/* - element/*
minio: hugo:
stage: build stage: build
tags: tags:
- docker - docker
script: script:
- cd minio - cd hugo
- make push - make push
only: only:
variables: variables:
- $CI_COMMIT_REF_PROTECTED == "true" - $CI_COMMIT_REF_PROTECTED == "true"
changes: changes:
- minio/* - hugo/*
dev-watchdog: dev-watchdog:
stage: build stage: build

View File

@ -1,19 +0,0 @@
FROM debian:buster-20210208-slim as builder
ARG DEBIAN_FRONTEND=noninteractive
ARG TARGETARCH
RUN apt update -qq && apt install wget -qqy && rm -rf /var/lib/apt/lists/*
ARG VERSION
RUN case $TARGETARCH in \
arm) \
wget https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-${VERSION}-armv6 -O /usr/bin/borg \
;; \
arm64) \
wget https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-${VERSION}-arm64 -O /usr/bin/borg \
;; \
amd64) \
wget https://github.com/borgbackup/borg/releases/download/${VERSION}/borg-linux64 -O /usr/bin/borg \
;; \
esac && \
chmod a+x /usr/bin/borg
FROM debian:buster-20210208-slim
COPY --from=builder /usr/bin/borg /usr/bin/borg

View File

@ -1,18 +0,0 @@
NAMESPACE=alemairebe
include version
IMAGE=borg
nopush:
docker buildx build --platform linux/amd64 --load \
--build-arg VERSION=$(VERSION) \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
push:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm --push \
--build-arg VERSION=$(VERSION) \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .

View File

@ -1 +0,0 @@
VERSION=1.1.15

View File

@ -1,15 +0,0 @@
FROM golang:buster as builder
ARG DEBIAN_FRONTEND=noninteractive
ARG VERSION
WORKDIR /
RUN git clone -b v${VERSION} --depth 1 https://github.com/matrix-org/dendrite.git && \
cd dendrite && rm -rf .git && ./build.sh
FROM debian:buster-20210208-slim
COPY --from=builder /dendrite/bin/ /usr/local/bin/
COPY --from=builder /dendrite/dendrite-config.yaml /usr/local/share/
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@ -1,21 +0,0 @@
NAMESPACE=alemairebe
include version
IMAGE=dendrite
nopush:
docker buildx build --platform linux/amd64 --load \
--build-arg VERSION=$(VERSION) \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
push:
docker buildx build --platform linux/amd64,linux/arm64 --push \
--build-arg VERSION=$(VERSION) \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
git-clone:
git clone -b v${VERSION} --depth 1 https://github.com/matrix-org/dendrite.git

View File

@ -1,13 +0,0 @@
#!/bin/bash
if [ ! -f /usr/local/etc/dendrite.yaml ]; then
cp /usr/local/share/dendrite-config.yaml /usr/local/etc/dendrite.yaml
fi
if [ ! -f /usr/local/etc/matrix_key.pem ]; then
/usr/local/bin/generate-keys --private-key /usr/local/etc/matrix_key.pem
fi
/usr/local/bin/dendrite-monolith-server --config /usr/local/etc/dendrite.yaml

View File

@ -1 +0,0 @@
VERSION=0.3.8

12
hugo/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
ARG DEBIAN_VERSION=20210408
ARG HUGO_VERSION
FROM docker.io/debian:bullseye-${DEBIAN_VERSION}-slim as builder
RUN apt-get update && apt-get install -y --no-install-recommends \
rsync \
openssh-client \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY hugo.sh /root/hugo.sh
RUN chmod +x /root/hugo.sh && /root/hugo.sh

14
hugo/Makefile Normal file
View File

@ -0,0 +1,14 @@
NAMESPACE=alemairebe
IMAGE=hugo
VERSION=0.83.1
push: build
build:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm --push \
--build-arg HUGO_VERSION=${VERSION}
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .

49
hugo/hugo.sh Normal file
View File

@ -0,0 +1,49 @@
#!/bin/sh
# This file is triggered inside the _base/Dockerfile-base file.
set -e
set -u
# Variables
# HUGO_VERSION is edited in Dockerfile.
# Architecture
TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then
HUGO_ARCH="64bit"
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then
HUGO_ARCH="ARM64"
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then
HUGO_ARCH="ARM"
else
echo "Unknown build architecture: $TARGETPLATFORM"
exit 2
fi
# Download binaries from release
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt
# Verify checksums
grep hugo_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz hugo_${HUGO_VERSION}_checksums.txt | sha256sum -c
# Prepare folders
mkdir -p /usr/local/bin/
# Unpack downloaded content
tar -zxf hugo_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz -C /usr/local/bin
# Verify executable
/usr/local/bin/hugo version
# Create autocompletion script
mkdir -p /etc/bash_completion.d
/usr/local/bin/hugo gen autocomplete > /etc/bash_completion.d/hugo.sh
# Create version file
echo -n "${HUGO_VERSION}" > /etc/hugo-release
# Remove binaries
rm hugo_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz hugo_${HUGO_VERSION}_checksums.txt

View File

@ -1,40 +0,0 @@
FROM golang:1.15-alpine as builder
LABEL maintainer="MinIO Inc <dev@min.io>"
ARG VERSION
ARG TARGETARCH
ENV VERSION $VERSION
ENV GOPATH /go
ENV CGO_ENABLED 0
ENV GO111MODULE on
RUN \
apk add --no-cache git && \
git clone -b ${VERSION} --depth 1 https://github.com/minio/minio && cd minio && \
go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)"
FROM alpine:3.13.0
ENV MINIO_ACCESS_KEY_FILE=access_key \
MINIO_SECRET_KEY_FILE=secret_key \
MINIO_KMS_MASTER_KEY_FILE=kms_master_key \
MINIO_SSE_MASTER_KEY_FILE=sse_master_key \
MINIO_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"
EXPOSE 9000
RUN \
apk add --no-cache ca-certificates 'curl>7.61.0' 'su-exec>=0.2' && \
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
ARG VERSION
ENV VERSION $VERSION
COPY --from=builder /go/bin/minio /usr/bin/minio
COPY --from=builder /go/minio/dockerscripts/docker-entrypoint.sh /usr/bin/
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
VOLUME ["/data"]
CMD ["minio"]

View File

@ -1,19 +0,0 @@
NAMESPACE=alemairebe
include version
IMAGE=minio
nopush:
docker buildx build --platform linux/amd64 --load \
--build-arg VERSION=$(VERSION) \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
push:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm --push \
--build-arg VERSION=$(VERSION) \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .

View File

@ -1 +0,0 @@
VERSION=RELEASE.2021-02-07T01-31-02Z

View File

@ -1,7 +0,0 @@
FROM alpine:3.13.0
ARG VERSION
ARG TARGETARCH
ENV VERSION $VERSION
ADD https://github.com/restic/restic/releases/download/v${VERSION}/restic_${VERSION}_linux_${TARGETARCH}.bz2 /root/restic.bz2
RUN bunzip2 /root/restic.bz2 && chmod +x /root/restic && mv /root/restic /usr/bin/restic
ENTRYPOINT ["/usr/bin/restic"]

View File

@ -1,18 +0,0 @@
NAMESPACE=alemairebe
include version
IMAGE=restic
nopush:
docker buildx build --platform linux/amd64 --load \
--build-arg VERSION=$(VERSION) \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
push:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm,linux/ppc64le --push \
--build-arg VERSION=$(VERSION) \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .

View File

@ -1 +0,0 @@
VERSION=0.11.0

View File

@ -1,8 +0,0 @@
FROM debian:buster-20210408-slim
ARG DEBIAN_FRONTEND=noninteractive
ARG VERSION
RUN apt update -qq && \
apt install -qqy --no-install-recommends watchdog=$VERSION && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/sbin/watchdog", "-F"]

View File

@ -1,19 +0,0 @@
NAMESPACE=alemairebe
include version
IMAGE=watchdog
nopush:
docker buildx build --platform linux/amd64 --load \
--build-arg VERSION=$(VERSION) \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .
push:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm,linux/ppc64le --push \
--build-arg VERSION=$(VERSION) \
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) .

View File

@ -1 +0,0 @@
VERSION=5.15-2