34 lines
1.6 KiB
Docker
34 lines
1.6 KiB
Docker
FROM ubuntu:jammy-20230816@sha256:b492494d8e0113c4ad3fe4528a4b5ff89faa5331f7d52c5c138196f69ce176a6
|
|
|
|
RUN apt update && \
|
|
apt install -y openssl mysql-client-8.0 sudo lsb-release vim gosu curl
|
|
|
|
RUN useradd --system --uid 808 --comment "Cloudron Box" --create-home --shell /usr/bin/bash yellowtent
|
|
|
|
RUN mkdir -p /mnt/cloudron-test-music /media/cloudron-test-music # volume test
|
|
|
|
# https://download.docker.com/linux/static/stable/x86_64/
|
|
RUN cd /usr/bin && curl -L https://download.docker.com/linux/static/stable/x86_64/docker-25.0.5.tgz | tar -zxvf - --strip-components=1 docker/docker
|
|
|
|
COPY setup/start/sudoers /etc/sudoers.d/cloudron
|
|
|
|
COPY test/cloak /usr/bin/cloak
|
|
RUN ln -s /usr/bin/cloak /usr/bin/systemd-run && \
|
|
ln -s /usr/bin/cloak /usr/bin/systemctl
|
|
|
|
COPY test/entrypoint.sh /usr/bin/entrypoint.sh
|
|
|
|
WORKDIR /home/yellowtent
|
|
USER yellowtent
|
|
|
|
RUN mkdir -p appsdata
|
|
RUN mkdir -p boxdata/box boxdata/mail boxdata/certs boxdata/mail/dkim/localhost boxdata/mail/dkim/foobar.com
|
|
RUN mkdir -p platformdata/addons/mail/banner platformdata/nginx/cert platformdata/nginx/applications/dashboard platformdata/collectd/collectd.conf.d platformdata/addons platformdata/logrotate.d platformdata/backup platformdata/logs/tasks platformdata/sftp/ssh platformdata/firewall platformdata/update
|
|
|
|
RUN bash -c 'openssl req -x509 -newkey rsa:2048 -keyout platformdata/nginx/cert/host.key -out platformdata/nginx/cert/host.cert -days 3650 -subj '/CN=localhost' -nodes -config <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=DNS:*.localhost"))'
|
|
|
|
WORKDIR /home/yellowtent/box
|
|
|
|
USER root
|
|
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
|