Add non-root minio user.

This adds a minio user and runs minio as that user instead of
as root.
master
Matt Butcher 9 years ago
parent 37a02670f5
commit c486dfbb7b
  1. 6
      Dockerfile

@ -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…
Cancel
Save