Compare commits

...

31 commits
v0.9 ... main

Author SHA1 Message Date
e04ff0de31 Merge branch 'renovate/alpine-3.x' into 'main'
Update dependency alpine to v3.16

See merge request docker-multiarch/minio!2
2022-07-24 11:35:01 +00:00
Renovate Bot
773a54100c Update dependency alpine to v3.16 2022-07-24 11:31:08 +00:00
7df6fc28ff Merge branch 'renovate/golang-1.x' into 'main'
Update dependency golang to v1.18

See merge request docker-multiarch/minio!3
2022-07-24 11:30:25 +00:00
Renovate Bot
721240018a Update dependency golang to v1.18 2022-07-24 08:01:39 +00:00
e603ab2f2d Merge branch 'renovate/configure' into 'main'
Configure Renovate

See merge request docker-multiarch/minio!1
2022-07-24 07:47:42 +00:00
Renovate Bot
01b5a431d7 Add renovate.json 2022-07-23 09:25:46 +00:00
1fc9cd8b3e we need to get the latest tag an work with it in the dockerfile also 2021-06-23 22:40:23 +02:00
cc06145256 nope, we need to return 0 ;) 2021-06-23 22:30:09 +02:00
dc69f4a6f4 we need to return 1 if nothing is to do, not true 2021-06-23 22:28:59 +02:00
af91e01939 we are tagging the images from github releases now and build only if there is a new release 2021-06-23 22:22:11 +02:00
0906c14ba9 get rid of the private registry base image and tag the images with the current date 2021-06-16 15:05:10 +02:00
ef94273ee6 tag the images with the build-date instead of the commit slug 2021-06-16 14:50:56 +02:00
a9a5f6cb75 also publish the images on docker hub 2021-06-16 09:14:24 +02:00
a1c4e8f001 fixed the latest tag generation/push 2021-06-16 09:06:37 +02:00
fff395c3aa unique buildx builder name to prevent hickups 2021-06-10 09:25:32 +02:00
98bf3f9c8a make build platforms configurable via CI var 2021-06-10 09:25:09 +02:00
ce0a2455fa new single-stage multiarch ci 2021-06-09 13:50:48 +02:00
5efa0b15b2 everything seems to work, so build for arm64 and amd64 again 2021-04-15 13:27:28 +02:00
7365715b11 okay, go install is neccessary in this setup 2021-04-15 13:21:38 +02:00
40279c8377 build with go 1.16 - now it should work... 2021-04-15 13:15:41 +02:00
f9e9c4ec71 yeah, clone the release branch and then checkout the master branch. 'doh! 2021-04-15 12:59:52 +02:00
222b33ed62 no gods, no masters! 2021-04-15 12:47:33 +02:00
74fda793ec clone the release branch, not the master/dev branch of the upstream repo 2021-04-15 12:46:48 +02:00
89ddb40b07 build with 1.14 and try to build instead of install 2021-04-15 12:39:43 +02:00
6ae2db23fe try to build with golang 1.13 2021-04-15 12:26:24 +02:00
a686da6b42 try to build wiht golang 1.15 2021-04-15 12:12:28 +02:00
9460a7b4db only build for armv7 for the moment 2021-04-15 12:03:53 +02:00
46c69f55a6 added global docker vars to ci config 2020-11-16 13:58:52 +01:00
Kelly Hair
79e14321b2 Update .gitlab-ci.yml 2020-09-14 17:41:37 +00:00
Kelly Hair
20ddde3b63 Update Dockerfile 2020-09-14 16:57:53 +00:00
Kelly Hair
c10276e788 Update Dockerfile 2020-09-14 16:51:45 +00:00
3 changed files with 40 additions and 94 deletions

View file

@ -1,87 +1,31 @@
# Credit -> https://stackoverflow.com/questions/58600986/gitlab-ci-trying-to-use-docker-buildx-to-build-for-arm64 image: egon0/docker-with-buildx-and-git:latest
stages:
- buildx
- deploy
- Weekly buildx
- Weekly deploy
# ----- Ad hoc Builds -----
buildx:
image: docker:19.03-git
stage: buildx
variables: variables:
GIT_STRATEGY: none DOCKER_HOST: tcp://docker:2375/
artifacts: DOCKER_DRIVER: overlay2
paths: DOCKER_TLS_CERTDIR: ""
- buildx
expire_in: 3 hour
services: services:
- docker:19.03-dind - docker:dind
script:
- export DOCKER_BUILDKIT=1
- git clone git://github.com/docker/buildx ./docker-buildx
- docker build --platform=local -o . ./docker-buildx
only:
changes:
- Dockerfile
- .gitlab-ci.yml
deploy: build:
image: docker:19.03 stage: build
stage: deploy
services:
- name: docker:19.03-dind
command: ["--experimental"]
before_script:
- mkdir -p ~/.docker/cli-plugins
- mv buildx ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker buildx create --use --name mybuilder
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $CI_REGISTRY_IMAGE .
only:
changes:
- Dockerfile
- .gitlab-ci.yml
# ----- Weekly Build -----
weekly:buildx:
image: docker:19.03-git
stage: Weekly buildx
variables: variables:
GIT_STRATEGY: none IMAGE_TAG: $CI_REGISTRY_IMAGE
artifacts: D_IMAGE_TAG: egon0/minio-multiarch
paths: D_LATEST_TAG: egon0/minio-multiarch:latest
- buildx
expire_in: 3 hour
services:
- docker:19.03-dind
script: script:
- export DOCKER_BUILDKIT=1 - >
- git clone git://github.com/docker/buildx ./docker-buildx apk add --no-cache jq;
- docker build --platform=local -o . ./docker-buildx LATEST_MINIO_GITHUB=$(wget --quiet "https://api.github.com/repos/minio/minio/releases/latest" -O - | jq -r '.tag_name');
only: LATEST_MINIO_DHUB=$(wget -q https://registry.hub.docker.com/v1/repositories/egon0/minio-multiarch/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | tail -n1);
- schedules if [ "$LATEST_MINIO_GITHUB" != "$LATEST_MINIO_DHUB" ]
- master then
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
docker buildx create --use --name A$CI_COMMIT_SHORT_SHA
docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG:$LATEST_MINIO_GITHUB -t $CI_REGISTRY_IMAGE:latest -t $D_IMAGE_TAG:$LATEST_MINIO_GITHUB -t $D_LATEST_TAG .
else
return 0
fi
weekly:deploy:
image: docker:19.03
stage: Weekly deploy
services:
- name: docker:19.03-dind
command: ["--experimental"]
before_script:
- mkdir -p ~/.docker/cli-plugins
- mv buildx ~/.docker/cli-plugins/docker-buildx
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker buildx create --use --name mybuilder
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $CI_REGISTRY_IMAGE .
only:
- schedules
- master

View file

@ -1,20 +1,19 @@
#Pulled from: https://hub.docker.com/r/minio/minio/dockerfile FROM golang:1.18-alpine as builder
FROM golang:1.13-alpine
LABEL maintainer="Kelly Hair <khair@gitlab.com>"
LABEL maintainer="MinIO Inc <dev@min.io>"
ENV GOPATH /go ENV GOPATH /go
ENV CGO_ENABLED 0 ENV CGO_ENABLED 0
ENV GO111MODULE on ENV GO111MODULE on
RUN \ RUN \
apk add --no-cache git && \ apk add --no-cache git jq && \
git config --global advice.detachedHead false && \
LATEST_MINIO_GITHUB=$(wget --quiet "https://api.github.com/repos/minio/minio/releases/latest" -O - | jq -r '.tag_name'); \
git clone https://github.com/minio/minio && cd minio && \ git clone https://github.com/minio/minio && cd minio && \
go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)" git checkout "$LATEST_MINIO_GITHUB" && go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)"
FROM alpine:3.10 FROM alpine:3.16
ENV MINIO_UPDATE off ENV MINIO_UPDATE off
ENV MINIO_ACCESS_KEY_FILE=access_key \ ENV MINIO_ACCESS_KEY_FILE=access_key \
@ -24,9 +23,9 @@ ENV MINIO_ACCESS_KEY_FILE=access_key \
EXPOSE 9000 EXPOSE 9000
COPY --from=0 /go/bin/minio /usr/bin/minio COPY --from=builder /go/bin/minio /usr/bin/minio
COPY --from=0 /go/minio/CREDITS /third_party/ COPY --from=builder /go/minio/CREDITS /third_party/
COPY --from=0 /go/minio/dockerscripts/docker-entrypoint.sh /usr/bin/ COPY --from=builder /go/minio/dockerscripts/docker-entrypoint.sh /usr/bin/
RUN \ RUN \
apk add --no-cache ca-certificates 'curl>7.61.0' 'su-exec>=0.2' && \ apk add --no-cache ca-certificates 'curl>7.61.0' 'su-exec>=0.2' && \

3
renovate.json Normal file
View file

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}