Skip to content

Commit 996779c

Browse files
committed
Move CMD to root run files to implement PUID and PGID
Signed-off-by: Nicholas Wilde <ncwilde43@gmail.com>
1 parent ddeeae6 commit 996779c

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
sqlite-dev=3.34.1-r0 \
1010
tcl-dev=8.6.10-r1 \
1111
zlib-dev=1.2.11-r3 \
12-
curl=7.76.1-r0 \
12+
curl=7.77.0-r0 \
1313
alpine-sdk=1.0-r0 && \
1414
wget "https://www.fossil-scm.org/home/uv/fossil-src-${VERSION}.tar.gz" -qO fossil-src.tar.gz && \
1515
echo "${CHECKSUM} fossil-src.tar.gz" | sha256sum -c && \
@@ -44,6 +44,7 @@ RUN \
4444
chown -R abc:abc /app && \
4545
echo "**** cleanup ****" && \
4646
rm -rf /tmp/*
47+
# copy local files
48+
COPY root/ /
4749
EXPOSE 8080
4850
VOLUME /app
49-
CMD ["/usr/bin/fossil", "server", "--create", "--user", "admin", "/app/repository.fossil"]

LS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3
1+
4

root/etc/cont-init.d/30-config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# permissions
4+
chown -R abc:abc \
5+
/app

root/etc/services.d/fossil/run

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
cd /app || exit
4+
5+
exec \
6+
s6-setuidgid abc \
7+
/usr/bin/fossil \
8+
server \
9+
--create \
10+
--user admin \
11+
/app/repository.fossil

0 commit comments

Comments
 (0)