Files
online-backend/deployment/Dockerfile.minio
GuwandykA e5f01d0e94
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled
add docker
2026-10-23 00:39:04 +05:00

41 lines
1.3 KiB
Docker
Executable File

# MinIO no longer publishes images (quay.io/minio/minio and minio/minio are not
# pullable), so the server binary comes from minio.deb next to this file.
# Both stages use golang:1.26.4-alpine, which is already in the offline bundle,
# so this builds without network.
FROM golang:1.26.4-alpine AS extract
WORKDIR /tmp/deb
COPY minio.deb .
# A .deb is an ar archive and busybox here has no `ar`, so read it by hand:
# 8-byte magic, then per member a 60-byte header (name at 1-16, size at 49-58),
# the data, and one pad byte when the size is odd.
RUN set -e; \
f=minio.deb; off=8; total=$(stat -c %s "$f"); \
while [ "$off" -lt "$total" ]; do \
name=$(tail -c +$((off + 1)) "$f" | head -c 16 | tr -d ' /'); \
size=$(tail -c +$((off + 49)) "$f" | head -c 10 | tr -d ' '); \
if [ "$name" = "data.tar.gz" ]; then \
tail -c +$((off + 61)) "$f" | head -c "$size" | tar -xzf - ./usr/local/bin/minio; \
break; \
fi; \
off=$((off + 60 + size + size % 2)); \
done; \
./usr/local/bin/minio --version
FROM golang:1.26.4-alpine
COPY --from=extract /tmp/deb/usr/local/bin/minio /usr/bin/minio
RUN mkdir /storage
VOLUME /storage
ENV MINIO_VOLUMES="/storage"
EXPOSE 9000
EXPOSE 9093
CMD ["minio", "server", "/storage", "--console-address", ":9093"]