Spaces:
Running
Running
File size: 1,137 Bytes
26d5f12 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
FROM selenium/node-edge
ENV GBP_USER ${GBP_USER:-gbp}
ENV GBP_USER_ID ${GBP_USER_ID:-1000}
WORKDIR /app
USER root
RUN apt-get update && apt-get install -y curl wget && \
curl -L $(curl -s https://api.github.com/repos/Niansuh/go-bingai-pass/releases/latest | grep /go-bingai-pass-linux-amd64.tar.gz | cut -d '"' -f 4) -o go-bingai-pass-linux-amd64.tar.gz && \
tar -zxvf go-bingai-pass-linux-amd64.tar.gz && \
chmod +x go-bingai-pass
RUN apt-get remove -y curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm go-bingai-pass-linux-amd64.tar.gz
COPY supervisor.conf /etc/supervisor/conf.d/selenium.conf
RUN groupadd -g $GBP_USER_ID $GBP_USER
RUN useradd -rm -G sudo -u $GBP_USER_ID -g $GBP_USER_ID $GBP_USER
RUN mkdir -p /tmp/edge
RUN chown "${GBP_USER_ID}:${GBP_USER_ID}" /var/run/supervisor /var/log/supervisor
RUN chown -R "${GBP_USER_ID}:${GBP_USER_ID}" /app /tmp/edge
RUN chmod 777 /tmp
USER $GBP_USER
ENV PORT=7860
ENV BROWSER_BINARY=/usr/bin/microsoft-edge
# ENV PASS_TIMEOUT=10
# ENV CHROME_PATH=/opt/google/chrome
ENV XDG_CONFIG_HOME=/tmp/edge
ENV XDG_CACHE_HOME=/tmp/edge
EXPOSE 7860 |