Fossil

Dockerfile-nojail.patch at [81c30ab97d]
Login

File containers/Dockerfile-nojail.patch artifact 9a17828fa4 part of check-in 81c30ab97d


Index: Dockerfile
==================================================================
--- Dockerfile
+++ Dockerfile
@@ -57,13 +57,13 @@
 ## ---------------------------------------------------------------------
 ## STAGE 2: Pare that back to the bare essentials.
 ## ---------------------------------------------------------------------
 
 FROM scratch AS os
-WORKDIR /jail
+WORKDIR /
 ARG UID=499
-ENV PATH "/bin:/jail/bin"
+ENV PATH "/bin"
 
 ### Lay BusyBox down as the first base layer. Coupled with the host's
 ### kernel, this is the "OS" used to RUN the subsequent setup script.
 COPY --from=builder /tmp/bbx/busybox /bin/
 RUN [ "/bin/busybox", "--install", "/bin" ]
@@ -72,23 +72,23 @@
 ### anything likely to change often.  So long as the user leaves
 ### UID alone, this layer will be durable.
 RUN set -x                                                             \
     && echo "root:x:0:0:Admin:/:/false"                 > /etc/passwd  \
     && echo "root:x:0:root"                             > /etc/group   \
-    && echo "fossil:x:${UID}:${UID}:User:/jail:/false" >> /etc/passwd  \
+    && echo "fossil:x:${UID}:${UID}:User:/:/false"     >> /etc/passwd  \
     && echo "fossil:x:${UID}:fossil"                   >> /etc/group   \
     && install -d -m 700 -o fossil -g fossil log museum                \
     && install -d -m 755 -o fossil -g fossil dev                       \
     && install -d -m 1777 -o root -g root /tmp                         \
     && mknod -m 666 dev/null    c 1 3                                  \
     && mknod -m 444 dev/urandom c 1 9
 
 ### Do Fossil-specific things atop those base layers; this will change
 ### as often as the Fossil build-from-source layer above.
-COPY --from=builder /tmp/fossil bin/
+COPY --from=builder /tmp/fossil /bin/
 RUN set -x                                                             \
-    && ln -s /jail/bin/fossil /bin/f                                   \
+    && ln -s /bin/fossil /bin/f                                        \
     && echo -e '#!/bin/sh\nfossil sha1sum "$@"' > /bin/sha1sum         \
     && echo -e '#!/bin/sh\nfossil sha3sum "$@"' > /bin/sha3sum         \
     && echo -e '#!/bin/sh\nfossil sqlite3 --no-repository "$@"' >      \
        /bin/sqlite3                                                    \
     && chmod +x /bin/sha?sum /bin/sqlite3
@@ -99,10 +99,9 @@
 ## ---------------------------------------------------------------------
 
 EXPOSE 8080/tcp
 CMD [ \
     "fossil", "server",     \
-    "--chroot", "/jail",    \
     "--create",             \
     "--jsmode", "bundled",  \
     "--user", "admin",      \
     "museum/repo.fossil" ]