Fossil SCM
Switched from "adduser" and "addgroup" commands for setting up the "fossil" user to direct echo-into-output, same as we already do for the root user. We had to to it for root since the BusyBox implementation of adduser/addgroup won't create these files if they're missing, but that meant we had two different ways of creating users and groups. This not only removes a weak dependency, it's more consistent.
Commit
fff11fc60486f2d2682b2fb7c7533682a6f96c1ac1edbfcc5d8e5bae36d998d4
Parent
2f0144071a1cd37…
1 file changed
+4
-4
+4
-4
| --- Dockerfile | ||
| +++ Dockerfile | ||
| @@ -71,14 +71,14 @@ | ||
| 71 | 71 | |
| 72 | 72 | ### Set up that base OS for our specific use without tying it to |
| 73 | 73 | ### anything likely to change often. So long as the user leaves |
| 74 | 74 | ### UID alone, this layer will be durable. |
| 75 | 75 | RUN set -x \ |
| 76 | - && echo 'root:x:0:0:SysAdmin:/:/bin/nologin' > /etc/passwd \ | |
| 77 | - && echo 'root:x:0:root' > /etc/group \ | |
| 78 | - && addgroup -S -g ${UID} fossil \ | |
| 79 | - && adduser -S -h `pwd` -g 'Fossil User' -G fossil -u ${UID} fossil \ | |
| 76 | + && echo "root:x:0:0:Admin:/:/false" > /etc/passwd \ | |
| 77 | + && echo "root:x:0:root" > /etc/group \ | |
| 78 | + && echo "fossil:x:${UID}:${UID}:User:/jail:/false" >> /etc/passwd \ | |
| 79 | + && echo "fossil:x:${UID}:fossil" >> /etc/group \ | |
| 80 | 80 | && install -d -m 700 -o fossil -g fossil log museum \ |
| 81 | 81 | && install -d -m 755 -o fossil -g fossil dev \ |
| 82 | 82 | && install -d -m 755 -o root -g root /usr/bin \ |
| 83 | 83 | && install -d -m 400 -o root -g root /run \ |
| 84 | 84 | && install -d -m 1777 -o root -g root /tmp \ |
| 85 | 85 |
| --- Dockerfile | |
| +++ Dockerfile | |
| @@ -71,14 +71,14 @@ | |
| 71 | |
| 72 | ### Set up that base OS for our specific use without tying it to |
| 73 | ### anything likely to change often. So long as the user leaves |
| 74 | ### UID alone, this layer will be durable. |
| 75 | RUN set -x \ |
| 76 | && echo 'root:x:0:0:SysAdmin:/:/bin/nologin' > /etc/passwd \ |
| 77 | && echo 'root:x:0:root' > /etc/group \ |
| 78 | && addgroup -S -g ${UID} fossil \ |
| 79 | && adduser -S -h `pwd` -g 'Fossil User' -G fossil -u ${UID} fossil \ |
| 80 | && install -d -m 700 -o fossil -g fossil log museum \ |
| 81 | && install -d -m 755 -o fossil -g fossil dev \ |
| 82 | && install -d -m 755 -o root -g root /usr/bin \ |
| 83 | && install -d -m 400 -o root -g root /run \ |
| 84 | && install -d -m 1777 -o root -g root /tmp \ |
| 85 |
| --- Dockerfile | |
| +++ Dockerfile | |
| @@ -71,14 +71,14 @@ | |
| 71 | |
| 72 | ### Set up that base OS for our specific use without tying it to |
| 73 | ### anything likely to change often. So long as the user leaves |
| 74 | ### UID alone, this layer will be durable. |
| 75 | RUN set -x \ |
| 76 | && echo "root:x:0:0:Admin:/:/false" > /etc/passwd \ |
| 77 | && echo "root:x:0:root" > /etc/group \ |
| 78 | && echo "fossil:x:${UID}:${UID}:User:/jail:/false" >> /etc/passwd \ |
| 79 | && echo "fossil:x:${UID}:fossil" >> /etc/group \ |
| 80 | && install -d -m 700 -o fossil -g fossil log museum \ |
| 81 | && install -d -m 755 -o fossil -g fossil dev \ |
| 82 | && install -d -m 755 -o root -g root /usr/bin \ |
| 83 | && install -d -m 400 -o root -g root /run \ |
| 84 | && install -d -m 1777 -o root -g root /tmp \ |
| 85 |