AydarZaynutdinov commented on a change in pull request #16659:
URL: https://github.com/apache/beam/pull/16659#discussion_r797860263
##########
File path: playground/backend/containers/scio/Dockerfile
##########
@@ -60,10 +60,25 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
-ENTRYPOINT ["/opt/playground/backend/server_scio_backend"]
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
+
+# Create a user group `appgroup` and a user `appuser`
+RUN groupadd --gid 20000 appgroup \
+ && useradd --uid 20000 --gid appgroup --shell /bin/bash --create-home appuser
+# Chown all the files to the app user.
+RUN chown -R appuser:appgroup /opt/playground/backend/
+RUN chmod +x /entrypoint.sh
Review comment:
Done.
##########
File path: playground/backend/containers/scio/Dockerfile
##########
@@ -60,10 +60,25 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
-ENTRYPOINT ["/opt/playground/backend/server_scio_backend"]
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
+
Review comment:
Done.
##########
File path: playground/backend/containers/python/Dockerfile
##########
@@ -57,10 +57,25 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
+
+# Create a user group `appgroup` and a user `appuser`
+RUN groupadd --gid 20000 appgroup \
+ && useradd --uid 20000 --gid appgroup --shell /bin/bash --create-home appuser
+# Chown all the files to the app user.
+RUN chown -R appuser:appgroup /opt/playground/backend/
+RUN chmod +x /entrypoint.sh
+
Review comment:
Done.
##########
File path: playground/backend/containers/python/Dockerfile
##########
@@ -57,10 +57,25 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
Review comment:
Done.
##########
File path: playground/backend/containers/java/Dockerfile
##########
@@ -81,10 +81,26 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
+
+# Create a user group `appgroup` and a user `appuser`
+RUN groupadd --gid 20000 appgroup \
+ && useradd --uid 20000 --gid appgroup --shell /bin/bash --create-home appuser
+# Chown all the files to the app user.
+RUN chown -R appuser:appgroup /opt/playground/backend/
+RUN chown -R appuser:appgroup /opt/apache/beam/jars/
+RUN chmod +x /entrypoint.sh
Review comment:
Done.
##########
File path: playground/backend/containers/java/Dockerfile
##########
@@ -81,10 +81,26 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
Review comment:
Done.
##########
File path: playground/backend/containers/go/Dockerfile
##########
@@ -63,10 +63,26 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
+
+# Create a user group `appgroup` and a user `appuser`
+RUN groupadd --gid 20000 appgroup \
+ && useradd --uid 20000 --gid appgroup --shell /bin/bash --create-home appuser
+# Chown all the files to the app user.
+RUN chown -R appuser:appgroup /opt/playground/backend/
+RUN chown -R appuser:appgroup /opt/playground/prepared_folder/
+RUN chmod +x /entrypoint.sh
Review comment:
Done.
##########
File path: playground/backend/containers/go/Dockerfile
##########
@@ -63,10 +63,26 @@ RUN mkdir /opt/mitmproxy &&\
wget https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-linux.tar.gz &&\
tar -zxvf mitmproxy-7.0.4-linux.tar.gz &&\
mkdir /usr/local/share/ca-certificates/extra
-COPY entrypoint.sh /
COPY allow_list_proxy.py /opt/mitmproxy/
COPY allow_list.py /opt/mitmproxy/
ENV HTTP_PROXY="http://127.0.0.1:8081"
ENV HTTPS_PROXY="http://127.0.0.1:8081"
+COPY entrypoint.sh /
+COPY proxy.sh /
+# Run proxy
+RUN chmod +x /proxy.sh
+RUN /proxy.sh
Review comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]