|
|
| FROM debian:bookworm-slim
|
|
|
|
|
| ENV DEBIAN_FRONTEND=noninteractive
|
| ENV HOME=/home/user
|
| ENV PATH=$HOME/.local/bin:$PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| RUN apt-get update && apt-get install -y \
|
| curl \
|
| wget \
|
| git \
|
| sudo \
|
| vim \
|
| nano \
|
| unzip \
|
| procps \
|
| net-tools \
|
| nginx \
|
| netcat-openbsd \
|
| build-essential \
|
| cmake \
|
| pkg-config \
|
| && apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
| RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 -O /usr/bin/ttyd \
|
| && chmod +x /usr/bin/ttyd
|
|
|
|
|
| RUN wget https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v7.6.0/oauth2-proxy-v7.6.0.linux-amd64.tar.gz \
|
| && tar -xzf oauth2-proxy-v7.6.0.linux-amd64.tar.gz \
|
| && mv oauth2-proxy-v7.6.0.linux-amd64/oauth2-proxy /usr/bin/oauth2-proxy \
|
| && chmod +x /usr/bin/oauth2-proxy \
|
| && rm -rf oauth2-proxy-v7.6.0.linux-amd64*
|
|
|
|
|
|
|
| RUN useradd -m -u 1000 user && \
|
| echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
|
| WORKDIR $HOME
|
|
|
|
|
| COPY --chown=user:user nginx.conf /etc/nginx/nginx.conf
|
| COPY --chown=user:user oauth2-proxy-github.cfg $HOME/oauth2-proxy-github.cfg
|
| COPY --chown=user:user sign_in.html /var/www/html/theme/sign_in.html
|
| COPY --chown=user:user start.sh $HOME/start.sh
|
| RUN chmod +x $HOME/start.sh
|
|
|
|
|
| USER user
|
|
|
|
|
| EXPOSE 7860
|
|
|
|
|
| CMD ["./start.sh"]
|
|
|