build(docker): base image added

Setup dockerfile with base components.

MR !1
This commit is contained in:
2022-02-14 09:25:02 +09:30
parent 516541b5e0
commit ec9e329956
3 changed files with 68 additions and 0 deletions

22
dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM debian:bullseye-slim
# Install dependencies
RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
curl \
gpg \
gpg-agent \
apt-transport-https \
ca-certificates \
supervisor
RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
# System Apps
cron \
rsyslog \
logrotate \
# Cleanup, remove cron jobs not required
RUN rm -f /etc/cron.d/e2scrub_all \
&& rm -f /etc/cron.daily/apt-compat \
&& rm -f /etc/cron.daily/dpkg

View File

@ -0,0 +1,23 @@
/var/log/syslog
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
/var/log/lastlog
/var/log/faillog
{
rotate 30
daily
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
supervisorctl restart rsyslog
endscript
}

View File

@ -0,0 +1,23 @@
[supervisord]
#daemon=false
nodaemon = true
pidfile=/var/run/supervisord.pid
[program:rsyslog]
startsecs=0
stopwaitsecs=55
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
command=/usr/sbin/rsyslogd -n
[program:cron]
startsecs=0
stopwaitsecs=55
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
command=/usr/sbin/cron -f