mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
55dd017e62
There is no reliable way to handle fallbacks for MinIO deployments, due to various command line options and multiple locations which require access inside container. Parsing command line options is tricky to figure out which is the backend disk etc, we did try to fix this in implementations of check-user.go but it wasn't complete and introduced more bugs. This PR simplifies the entire approach to rather than running Docker container as non-root by default always, it allows users to opt-in. Such that they are aware that that is what they are planning to do. In-fact there are other ways docker containers can be run as regular users, without modifying our internal behavior and adding more complexities.
28 lines
684 B
Docker
28 lines
684 B
Docker
FROM alpine:3.9
|
|
|
|
LABEL maintainer="MinIO Inc <dev@min.io>"
|
|
|
|
COPY dockerscripts/docker-entrypoint.sh dockerscripts/healthcheck /usr/bin/
|
|
COPY minio /usr/bin/
|
|
|
|
ENV MINIO_UPDATE off
|
|
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
|
MINIO_SECRET_KEY_FILE=secret_key
|
|
|
|
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 && \
|
|
chmod +x /usr/bin/minio && \
|
|
chmod +x /usr/bin/docker-entrypoint.sh && \
|
|
chmod +x /usr/bin/healthcheck
|
|
|
|
EXPOSE 9000
|
|
|
|
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
|
|
|
VOLUME ["/data"]
|
|
|
|
HEALTHCHECK --interval=1m CMD healthcheck
|
|
|
|
CMD ["minio"]
|