mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-02 19:07:46 +00:00
fix startup script
This commit is contained in:
@@ -48,6 +48,8 @@ RUN /bin/busybox ln -s /bin/busybox /bin/addgroup
|
|||||||
RUN /bin/busybox ln -s /bin/busybox /bin/adduser
|
RUN /bin/busybox ln -s /bin/busybox /bin/adduser
|
||||||
COPY --from=builder /etc/group /etc/
|
COPY --from=builder /etc/group /etc/
|
||||||
RUN /bin/busybox touch /etc/passwd
|
RUN /bin/busybox touch /etc/passwd
|
||||||
|
RUN /bin/busybox mkdir -p /tmp
|
||||||
|
RUN /bin/busybox chmod 0777 /tmp
|
||||||
# Create a group and user
|
# Create a group and user
|
||||||
RUN addgroup -S appgroup && adduser --no-create-home -S appuser -G appgroup
|
RUN addgroup -S appgroup && adduser --no-create-home -S appuser -G appgroup
|
||||||
# Tell docker that all future commands should run as the appuser user
|
# Tell docker that all future commands should run as the appuser user
|
||||||
|
|||||||
5
run.sh
5
run.sh
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
if [ ! -f /databunker/data/databunker.db ]; then
|
if [ ! -f /databunker/data/databunker.db ]; then
|
||||||
echo "-------------INIT------------"
|
echo "-------------INIT------------"
|
||||||
/bin/busybox mkdir -p /tmp
|
#/bin/busybox mkdir -p /tmp
|
||||||
RESULT=`/databunker/bin/databunker -init -db /databunker/data/databunker.db -conf /databunker/conf/databunker.yaml > /tmp/init.txt`
|
RESULT=`/databunker/bin/databunker -init -db /databunker/data/databunker.db -conf /databunker/conf/databunker.yaml > /tmp/init.txt`
|
||||||
echo $RESULT
|
echo $RESULT
|
||||||
DATABUNKER_ROOTTOKEN=`/bin/busybox awk '/API Root token:/ {print $4}' /tmp/init.txt`
|
DATABUNKER_ROOTTOKEN=`/bin/busybox awk '/API Root token:/ {print $4}' /tmp/init.txt`
|
||||||
@@ -18,5 +18,4 @@ fi
|
|||||||
echo "-------------FIND------------"
|
echo "-------------FIND------------"
|
||||||
/bin/busybox find /databunker
|
/bin/busybox find /databunker
|
||||||
echo "-------------RUN-------------"
|
echo "-------------RUN-------------"
|
||||||
/databunker/bin/databunker -masterkey $DATABUNKER_MASTERKEY \
|
/databunker/bin/databunker -start -db /databunker/data/databunker.db -conf /databunker/conf/databunker.yaml
|
||||||
-db /databunker/data/databunker.db -conf /databunker/conf/databunker.yaml
|
|
||||||
|
|||||||
Reference in New Issue
Block a user