-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
name: Build MinIO image | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'minio/**' | ||
- '!minio/README.md' | ||
- '.github/workflows/build-minio.yml' | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '35 4 * * 6' # Every Saturday at 04:35am | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
strategy: | ||
matrix: | ||
minio_version: ['RELEASE.2024-08-03T04-33-23Z'] | ||
mc_version: ['RELEASE.2024-07-31T15-58-33Z'] | ||
steps: | ||
- name: Check-out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU (for multi-arch build) | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push image to registry | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
context: ./minio | ||
file: ./minio/Dockerfile | ||
push: true | ||
build-args: | | ||
MINIO_VERSION=${{ matrix.minio_version }} | ||
MC_VERSION=${{ matrix.mc_version }} | ||
tags: | | ||
ghcr.io/f-bn/minio:${{ matrix.minio_version }} | ||
ghcr.io/f-bn/minio:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# --- Build stage --- | ||
FROM docker.io/golang:1.22 AS build-minio | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG MINIO_VERSION="RELEASE.2024-08-03T04-33-23Z" | ||
|
||
WORKDIR /build | ||
|
||
RUN git clone --single-branch --branch ${MINIO_VERSION} https://github.com/minio/minio.git /build | ||
RUN make build | ||
|
||
# --- Build stage --- | ||
FROM docker.io/golang:1.22 AS build-mc | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ARG MC_VERSION="RELEASE.2024-07-31T15-58-33Z" | ||
|
||
WORKDIR /build | ||
|
||
RUN git clone --single-branch --branch ${MC_VERSION} https://github.com/minio/mc.git /build | ||
RUN make build | ||
|
||
# --- Final stage --- | ||
FROM cgr.dev/chainguard/wolfi-base:latest | ||
|
||
COPY --from=build-minio --chmod=755 /build/minio /usr/bin/minio | ||
COPY --from=build-mc --chmod=755 /build/mc /usr/bin/mc | ||
|
||
RUN set -ex ; \ | ||
mkdir -p /var/lib/minio ; \ | ||
chown nonroot:nonroot /var/lib/minio | ||
|
||
USER nonroot | ||
|
||
EXPOSE 9000/tcp | ||
|
||
VOLUME [ "/var/lib/minio" ] | ||
|
||
ENTRYPOINT [ "/usr/bin/minio" ] | ||
|
||
CMD [ "server", "/var/lib/minio" ] | ||
|
||
LABEL \ | ||
org.opencontainers.image.title="minio" \ | ||
org.opencontainers.image.source="https://github.com/f-bn/containers-images/minio" \ | ||
org.opencontainers.image.description="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service" \ | ||
org.opencontainers.image.licenses="AGPL-3.0-only" \ | ||
org.opencontainers.image.authors="Florian Bobin <[email protected]>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## General informations | ||
|
||
Custom MinIO image built from sources with `mc` client embedded. | ||
|
||
Built with Go 1.22. | ||
|
||
## MinIO configuration | ||
|
||
MinIO is able to read configuration from environment variables or flags, this is still valid for this custom image. | ||
|
||
More informations about MinIO configuration [here](https://min.io/docs/minio/linux/reference/minio-server/minio-server.html). |