mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -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 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 \
|
||||
curl \
|
||||
git \
|
||||
@ -28,6 +32,8 @@ RUN apt-get remove -y build-essential curl git && \
|
||||
apt-get -y autoremove && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER minio
|
||||
|
||||
EXPOSE 9000 9001
|
||||
|
||||
CMD ["sh", "-c", "${GOPATH}/bin/minio server"]
|
||||
|
Loading…
Reference in New Issue
Block a user