ubuntu: add rsyslog package for logging
This commit is contained in:
parent
42a40149af
commit
8ecdba987b
@ -6,12 +6,16 @@ ENV DEBUG=${DEBUG}
|
|||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y nfs-kernel-server krb5-kdc krb5-admin-server nfs-common bash
|
RUN apt-get install -y nfs-kernel-server krb5-kdc krb5-admin-server nfs-common bash rsyslog
|
||||||
|
|
||||||
RUN if [ -n "${DEBUG}" ]; then \
|
RUN if [ -n "${DEBUG}" ]; then \
|
||||||
apt-get install iproute2 iputils-ping net-tools; \
|
apt-get install iproute2 iputils-ping net-tools; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
RUN cat > /etc/rsyslog.conf <<EOF
|
||||||
|
*.* /var/log/everything.log
|
||||||
|
EOF
|
||||||
|
|
||||||
COPY ./common.sh .
|
COPY ./common.sh .
|
||||||
COPY ./entrypoint-ubuntu.sh .
|
COPY ./entrypoint-ubuntu.sh .
|
||||||
COPY ./init.sh .
|
COPY ./init.sh .
|
||||||
|
|||||||
2
init.sh
2
init.sh
@ -4,6 +4,8 @@ ENTRY="./entrypoint.sh"
|
|||||||
|
|
||||||
if [ "$1" == "ubuntu" ]; then
|
if [ "$1" == "ubuntu" ]; then
|
||||||
ENTRY="./entrypoint-ubuntu.sh"
|
ENTRY="./entrypoint-ubuntu.sh"
|
||||||
|
service --status-all
|
||||||
|
service rsyslog start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec bash -xc $ENTRY 2>&1 | tee /root/stuff.log
|
exec bash -xc $ENTRY 2>&1 | tee /root/stuff.log
|
||||||
Loading…
x
Reference in New Issue
Block a user