From 020ca706609f85788e4487d3e18f2c9acf0b8ab7 Mon Sep 17 00:00:00 2001 From: reza Date: Tue, 2 Nov 2021 14:52:01 +0330 Subject: [PATCH 1/2] ansible dockerfile --- ansible/Dockerfile | 20 ++++++++++++++++++++ ansible/README.md | 15 +++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ansible/Dockerfile create mode 100644 ansible/README.md diff --git a/ansible/Dockerfile b/ansible/Dockerfile new file mode 100644 index 0000000..93ddd0e --- /dev/null +++ b/ansible/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:20.04 +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get install -y gcc python-dev libkrb5-dev && \ + apt-get install python3-pip -y && \ + pip3 install --upgrade pip && \ + pip3 install --upgrade virtualenv && \ + pip3 install pywinrm[kerberos] && \ + apt install krb5-user -y && \ + pip3 install pywinrm && \ + pip3 install ansible && \ + apt-get install -y iputils-ping && \ + apt install openssh-server sudo -y && \ useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 test + +RUN echo 'test:test' | chpasswd && \ +service ssh start + +EXPOSE 22 + +CMD ["/usr/sbin/sshd","-D"] diff --git a/ansible/README.md b/ansible/README.md new file mode 100644 index 0000000..13367a7 --- /dev/null +++ b/ansible/README.md @@ -0,0 +1,15 @@ +ansible +========== +This Dockerfile is for building an ansible environment. + +![](https://github.com/rezabojnordi) + +## Make Images + +``` +$ docker login + +$ docker build -t ansible:latest . +``` + +[1]: https://github.com/rezabojnordi From fa913423da94d96a038e1b6020b861934b14121c Mon Sep 17 00:00:00 2001 From: reza Date: Tue, 2 Nov 2021 15:05:39 +0330 Subject: [PATCH 2/2] This Dockerfile is for building an Nginx with modules module-vts --- nginx-module-vts/Dockerfile | 51 +++++++++++++++++++++++++++++++++++ nginx-module-vts/README.md | 15 +++++++++++ nginx-module-vts/nginx.conf | 53 +++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 nginx-module-vts/Dockerfile create mode 100644 nginx-module-vts/README.md create mode 100644 nginx-module-vts/nginx.conf diff --git a/nginx-module-vts/Dockerfile b/nginx-module-vts/Dockerfile new file mode 100644 index 0000000..47cf790 --- /dev/null +++ b/nginx-module-vts/Dockerfile @@ -0,0 +1,51 @@ +ARG VERSION=ubuntu +FROM alpine as builder + +ENV nginx_module_vts 0.1.18 +ENV NGINX_VERSION 1.20.1 +ARG DEBIAN_FRONTEND=noninteractive +RUN apk add --no-cache --virtual .build-deps \ + gcc \ + libc-dev \ + make \ + openssl-dev \ + pcre-dev \ + zlib-dev \ + linux-headers \ + libxslt-dev \ + gd-dev \ + geoip-dev \ + perl-dev \ + libedit-dev \ + mercurial \ + bash \ + alpine-sdk \ + findutils \ + build-base \ + pcre \ + openssl \ + zlib \ + git \ + wget \ + nano \ + vim +#CMD ["/usr/sbin/sshd", "-D"] +RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx-${NGINX_VERSION}.tar.gz && \ + git clone https://github.com/vozlt/nginx-module-vts && \ + tar xzvf nginx-${NGINX_VERSION}.tar.gz && \ + cd nginx-${NGINX_VERSION} && \ + sh -c "./configure --with-http_ssl_module --with-http_sub_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_v2_module --with-stream --with-file-aio --with-threads --with-http_auth_request_module --add-module=../nginx-module-vts" && \ + make && \ + make install + + +FROM alpine + +COPY --from=builder /usr/local/nginx /usr/local/nginx +RUN mkdir -p /usr/local/nginx/conf/vhost/ && \ + mkdir -p /var/cache/nginx/ && \ + mkdir -p /var/local/nginx/conf/ssl +COPY nginx.conf /usr/local/nginx/conf/nginx.conf + +SHELL ["/bin/bash", "-eo", "pipefail", "-c"] +CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"] diff --git a/nginx-module-vts/README.md b/nginx-module-vts/README.md new file mode 100644 index 0000000..3738c3d --- /dev/null +++ b/nginx-module-vts/README.md @@ -0,0 +1,15 @@ +ansible +========== +This Dockerfile is for building an Nginx with modules module-vts. + +![](https://github.com/rezabojnordi) + +## Make Images + +``` +$ docker login + +$ docker build -t nginx-module-vts:latest . +``` + +[1]: https://github.com/rezabojnordi diff --git a/nginx-module-vts/nginx.conf b/nginx-module-vts/nginx.conf new file mode 100644 index 0000000..bf065ea --- /dev/null +++ b/nginx-module-vts/nginx.conf @@ -0,0 +1,53 @@ +worker_processes auto; +worker_rlimit_nofile 100000; + +events { + use epoll; + worker_connections 10240; + multi_accept on; +} + +http { + include mime.types; + default_type application/octet-stream; + server_names_hash_bucket_size 128; + client_header_buffer_size 32k; + large_client_header_buffers 4 32k; + client_max_body_size 1024m; + client_body_buffer_size 10m; + sendfile on; + tcp_nopush on; + keepalive_timeout 120; + server_tokens off; + tcp_nodelay on; + vhost_traffic_status_zone; + + #Gzip Compression + gzip on; + gzip_buffers 16 8k; + gzip_comp_level 6; + gzip_http_version 1.1; + gzip_min_length 256; + gzip_proxied any; + gzip_vary on; + gzip_types + text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml + text/javascript application/javascript application/x-javascript + text/x-json application/json application/x-web-app-manifest+json + text/css text/plain text/x-component + font/opentype application/x-font-ttf application/vnd.ms-fontobject + image/x-icon; + gzip_disable "MSIE [1-6]\.(?!.*SV1)"; + + server { + server_name _; + listen 80; + location /status { + vhost_traffic_status_display; + vhost_traffic_status_display_format html; + } + } + + include vhost/*.conf; +} +