From 7f05eb81199d5d887cbe1cd828cdde1bee4dd1b6 Mon Sep 17 00:00:00 2001 From: "Pavel@Vostro5468" Date: Sat, 19 Jun 2021 00:07:21 +0300 Subject: [PATCH] optimized structure --- Dockerfile | 20 ++++++------------ build.sh | 3 ++- localtime => etc/localtime | Bin nginx.conf => etc/nginx/nginx.conf | 0 .../nginx/proxy-params.conf | 0 .../supervisor/conf.d/supervisord.conf | 0 timezone => etc/timezone | 0 7 files changed, 8 insertions(+), 15 deletions(-) rename localtime => etc/localtime (100%) rename nginx.conf => etc/nginx/nginx.conf (100%) rename proxy-params.conf => etc/nginx/proxy-params.conf (100%) rename supervisord.conf => etc/supervisor/conf.d/supervisord.conf (100%) rename timezone => etc/timezone (100%) diff --git a/Dockerfile b/Dockerfile index 0ab2125..23efc5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,12 @@ -FROM ubuntu +FROM debian:10 -#COPY apt-add-repos /usr/local/sbin -COPY timezone /etc/timezone -COPY localtime /etc/localtime +COPY ./etc /tmp/etc -RUN apt update -y \ +RUN apt-get update -y \ && apt-get install nginx supervisor -y - -#RUN rm -rf /var/www/html -COPY nginx.conf /etc/nginx/ -COPY proxy-params.conf /etc/nginx/ -#COPY fox-web /var/www/html - -#RUN a2enmod rewrite - -COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + && cp -vr /tmp/etc / \ + && rm -rf /tmp/* \ + && rm -rf /var/lib/apt/lists/* EXPOSE 80 EXPOSE 443 diff --git a/build.sh b/build.sh index 6bb7e5c..715cb03 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,4 @@ #!/bin/bash -docker build --tag=git.mxfox.ru/fox-proxy . +#docker build --tag=git.mxfox.ru/fox-proxy . +docker buildx build --platform linux/arm,linux/arm64,linux/amd64 --tag=mxfox.ru/infra/fox-proxy . --push \ No newline at end of file diff --git a/localtime b/etc/localtime similarity index 100% rename from localtime rename to etc/localtime diff --git a/nginx.conf b/etc/nginx/nginx.conf similarity index 100% rename from nginx.conf rename to etc/nginx/nginx.conf diff --git a/proxy-params.conf b/etc/nginx/proxy-params.conf similarity index 100% rename from proxy-params.conf rename to etc/nginx/proxy-params.conf diff --git a/supervisord.conf b/etc/supervisor/conf.d/supervisord.conf similarity index 100% rename from supervisord.conf rename to etc/supervisor/conf.d/supervisord.conf diff --git a/timezone b/etc/timezone similarity index 100% rename from timezone rename to etc/timezone