mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Add non-root minio user.
This adds a minio user and runs minio as that user instead of as root.
This commit is contained in:
parent
37a02670f5
commit
c486dfbb7b
@ -8,6 +8,10 @@ ENV GOROOT /usr/local/go/
|
|||||||
ENV GOPATH /go-workspace
|
ENV GOPATH /go-workspace
|
||||||
ENV PATH ${GOROOT}/bin:${GOPATH}/bin/:$PATH
|
ENV PATH ${GOROOT}/bin:${GOPATH}/bin/:$PATH
|
||||||
|
|
||||||
|
ENV MINIOHOME /home/minio
|
||||||
|
ENV MINIOUSER minio
|
||||||
|
RUN useradd -m -d $MINIOHOME $MINIOUSER
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get install -y -q \
|
RUN apt-get update -y && apt-get install -y -q \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
@ -28,6 +32,8 @@ RUN apt-get remove -y build-essential curl git && \
|
|||||||
apt-get -y autoremove && \
|
apt-get -y autoremove && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
USER minio
|
||||||
|
|
||||||
EXPOSE 9000 9001
|
EXPOSE 9000 9001
|
||||||
|
|
||||||
CMD ["sh", "-c", "${GOPATH}/bin/minio server"]
|
CMD ["sh", "-c", "${GOPATH}/bin/minio server"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user