mirror of
https://gitlab.com/alemaire/buildx.git
synced 2025-01-10 18:43:29 +00:00
Update borg/Dockerfile, borg/Makefile, borg/version, .gitlab-ci.yml files
This commit is contained in:
parent
88d4303396
commit
085ff89a4e
@ -150,6 +150,17 @@ roundcubemail:
|
|||||||
variables:
|
variables:
|
||||||
- $CI_COMMIT_REF_PROTECTED == "true"
|
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||||
|
|
||||||
|
borg:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
script:
|
||||||
|
- cd borg
|
||||||
|
- make push
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $CI_COMMIT_REF_PROTECTED == "true"
|
||||||
|
|
||||||
.docker_init: &docker_init |
|
.docker_init: &docker_init |
|
||||||
if ! docker info &>/dev/null; then
|
if ! docker info &>/dev/null; then
|
||||||
if [ -z "${DOCKER_HOST}" -a "${KUBERNETES_PORT}" ]; then
|
if [ -z "${DOCKER_HOST}" -a "${KUBERNETES_PORT}" ]; then
|
||||||
|
19
borg/Dockerfile
Normal file
19
borg/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM debian:buster-20210111-slim as builder
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG TARGETARCH
|
||||||
|
RUN apt update -qq && apt upgrade -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-20210111-slim
|
||||||
|
COPY --from=builder /usr/bin/borg /usr/bin/borg
|
18
borg/Makefile
Normal file
18
borg/Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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) .
|
1
borg/version
Normal file
1
borg/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
VERSION=1.1.15
|
Loading…
Reference in New Issue
Block a user