提交 5d7fae60 作者: Jeromy Johnson 提交者: GitHub

Merge pull request #4331 from ipfs/fix/gecos

Dockerfiles: do not set gecos field on user add. Set group.
...@@ -35,7 +35,7 @@ RUN set -x \ ...@@ -35,7 +35,7 @@ RUN set -x \
&& chmod +x tini && chmod +x tini
# Get the TLS CA certificates, they're not provided by busybox. # Get the TLS CA certificates, they're not provided by busybox.
RUN apt-get install -y ca-certificates RUN apt-get update && apt-get install -y ca-certificates
# Now comes the actual target image, which aims to be as small as possible. # Now comes the actual target image, which aims to be as small as possible.
FROM busybox:1-glibc FROM busybox:1-glibc
...@@ -62,8 +62,8 @@ EXPOSE 8081 ...@@ -62,8 +62,8 @@ EXPOSE 8081
# Create the fs-repo directory and switch to a non-privileged user. # Create the fs-repo directory and switch to a non-privileged user.
ENV IPFS_PATH /data/ipfs ENV IPFS_PATH /data/ipfs
RUN mkdir -p $IPFS_PATH \ RUN mkdir -p $IPFS_PATH \
&& adduser -D -h $IPFS_PATH -u 1000 -g 100 ipfs \ && adduser -D -h $IPFS_PATH -u 1000 -G users ipfs \
&& chown 1000:100 $IPFS_PATH && chown ipfs:users $IPFS_PATH
# Expose the fs-repo as a volume. # Expose the fs-repo as a volume.
# start_ipfs initializes an fs-repo if none is mounted. # start_ipfs initializes an fs-repo if none is mounted.
......
...@@ -58,8 +58,8 @@ EXPOSE 8081 ...@@ -58,8 +58,8 @@ EXPOSE 8081
# Create the fs-repo directory and switch to a non-privileged user. # Create the fs-repo directory and switch to a non-privileged user.
ENV IPFS_PATH /data/ipfs ENV IPFS_PATH /data/ipfs
RUN mkdir -p $IPFS_PATH \ RUN mkdir -p $IPFS_PATH \
&& useradd -s /usr/sbin/nologin -d $IPFS_PATH -u 1000 -g 100 ipfs \ && useradd -s /usr/sbin/nologin -d $IPFS_PATH -u 1000 -G users ipfs \
&& chown 1000:100 $IPFS_PATH && chown ipfs:users $IPFS_PATH
# Expose the fs-repo as a volume. # Expose the fs-repo as a volume.
# start_ipfs initializes an fs-repo if none is mounted. # start_ipfs initializes an fs-repo if none is mounted.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论