From 4e098aaa0aa4682210f1f0e67127e220869d5bbc Mon Sep 17 00:00:00 2001
From: Raoni Meira Gabriel <2515360+raonigabriel@users.noreply.github.com>
Date: Tue, 8 Dec 2020 17:09:10 -0300
Subject: [PATCH] Prepared multi-arch builds
---
386/Dockerfile | 26 ++++++++++++++++++++++++++
Dockerfile => amd64/Dockerfile | 0
arm64/Dockerfile | 26 ++++++++++++++++++++++++++
armv7/Dockerfile | 26 ++++++++++++++++++++++++++
4 files changed, 78 insertions(+)
create mode 100644 386/Dockerfile
rename Dockerfile => amd64/Dockerfile (100%)
create mode 100644 arm64/Dockerfile
create mode 100644 armv7/Dockerfile
diff --git a/386/Dockerfile b/386/Dockerfile
new file mode 100644
index 0000000..3e65949
--- /dev/null
+++ b/386/Dockerfile
@@ -0,0 +1,26 @@
+FROM alpine:edge
+
+# Whenever possible, install tools using the distro package manager
+RUN apk add --no-cache tini ttyd socat nginx unzip openssl openssh ca-certificates && \
+# Do some configuration for nginx
+ echo "daemon off;" >> /etc/nginx/nginx.conf && \
+ mkdir /run/nginx && \
+ echo "server { listen 80 default_server; root /var/www/localhost/htdocs; location / { try_files \$uri /index.html; } }" > /etc/nginx/conf.d/default.conf && \
+ echo "
Welcome to NginxNginx works!
" > /var/www/localhost/htdocs/index.html && \
+ chown -R 0:82 /var/www/localhost/htdocs && \
+# Download, install and configure ngrok
+ wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip && \
+ unzip ngrok-stable-linux-386.zip && \
+ mv ngrok /bin/ngrok && \
+ rm ngrok-stable-linux-386.zip && \
+ echo "web_addr: 0.0.0.0:4040" > /root/ngrok.yml && \
+# Configure a nice terminal
+ echo "export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /etc/profile && \
+# Fake poweroff (stops the container from the inside by sending SIGTERM to PID 1)
+ echo "alias poweroff='kill 1'" >> /etc/profile
+
+ENV TINI_KILL_PROCESS_GROUP=1
+
+EXPOSE 7681 4040 80
+ENTRYPOINT ["/sbin/tini", "--"]
+CMD [ "ttyd", "-s", "3", "-t", "titleFixed=/bin/sh", "-t", "rendererType=webgl", "-t", "disableLeaveAlert=true", "/bin/sh", "-i", "-l" ]
\ No newline at end of file
diff --git a/Dockerfile b/amd64/Dockerfile
similarity index 100%
rename from Dockerfile
rename to amd64/Dockerfile
diff --git a/arm64/Dockerfile b/arm64/Dockerfile
new file mode 100644
index 0000000..a513f24
--- /dev/null
+++ b/arm64/Dockerfile
@@ -0,0 +1,26 @@
+FROM alpine:edge
+
+# Whenever possible, install tools using the distro package manager
+RUN apk add --no-cache tini ttyd socat nginx unzip openssl openssh ca-certificates && \
+# Do some configuration for nginx
+ echo "daemon off;" >> /etc/nginx/nginx.conf && \
+ mkdir /run/nginx && \
+ echo "server { listen 80 default_server; root /var/www/localhost/htdocs; location / { try_files \$uri /index.html; } }" > /etc/nginx/conf.d/default.conf && \
+ echo "Welcome to NginxNginx works!
" > /var/www/localhost/htdocs/index.html && \
+ chown -R 0:82 /var/www/localhost/htdocs && \
+# Download, install and configure ngrok
+ wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm64.tgz && \
+ tar -zxf ngrok-stable-linux-arm64.tgz && \
+ mv ngrok /bin/ngrok && \
+ rm ngrok-stable-linux-arm64.tgz && \
+ echo "web_addr: 0.0.0.0:4040" > /root/ngrok.yml && \
+# Configure a nice terminal
+ echo "export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /etc/profile && \
+# Fake poweroff (stops the container from the inside by sending SIGTERM to PID 1)
+ echo "alias poweroff='kill 1'" >> /etc/profile
+
+ENV TINI_KILL_PROCESS_GROUP=1
+
+EXPOSE 7681 4040 80
+ENTRYPOINT ["/sbin/tini", "--"]
+CMD [ "ttyd", "-s", "3", "-t", "titleFixed=/bin/sh", "-t", "rendererType=webgl", "-t", "disableLeaveAlert=true", "/bin/sh", "-i", "-l" ]
\ No newline at end of file
diff --git a/armv7/Dockerfile b/armv7/Dockerfile
new file mode 100644
index 0000000..9afa13e
--- /dev/null
+++ b/armv7/Dockerfile
@@ -0,0 +1,26 @@
+FROM alpine:edge
+
+# Whenever possible, install tools using the distro package manager
+RUN apk add --no-cache tini ttyd socat nginx unzip openssl openssh ca-certificates && \
+# Do some configuration for nginx
+ echo "daemon off;" >> /etc/nginx/nginx.conf && \
+ mkdir /run/nginx && \
+ echo "server { listen 80 default_server; root /var/www/localhost/htdocs; location / { try_files \$uri /index.html; } }" > /etc/nginx/conf.d/default.conf && \
+ echo "Welcome to NginxNginx works!
" > /var/www/localhost/htdocs/index.html && \
+ chown -R 0:82 /var/www/localhost/htdocs && \
+# Download, install and configure ngrok
+ wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip && \
+ unzip ngrok-stable-linux-arm.zip && \
+ mv ngrok /bin/ngrok && \
+ rm ngrok-stable-linux-arm.zip && \
+ echo "web_addr: 0.0.0.0:4040" > /root/ngrok.yml && \
+# Configure a nice terminal
+ echo "export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> /etc/profile && \
+# Fake poweroff (stops the container from the inside by sending SIGTERM to PID 1)
+ echo "alias poweroff='kill 1'" >> /etc/profile
+
+ENV TINI_KILL_PROCESS_GROUP=1
+
+EXPOSE 7681 4040 80
+ENTRYPOINT ["/sbin/tini", "--"]
+CMD [ "ttyd", "-s", "3", "-t", "titleFixed=/bin/sh", "-t", "rendererType=webgl", "-t", "disableLeaveAlert=true", "/bin/sh", "-i", "-l" ]
\ No newline at end of file