|
FROM python:3.10 |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
USER root |
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY ./requirements.txt requirements.txt |
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt |
|
|
|
|
|
RUN apt-get update && apt-get install -y curl |
|
RUN curl -sSfL https://s3.amazonaws.com/sshx/sshx-x86_64-unknown-linux-musl.tar.gz | \ |
|
tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/sshx |
|
|
|
|
|
COPY . /app |
|
|
|
|
|
COPY start.sh /app/start.sh |
|
RUN chmod +x /app/start.sh |
|
|
|
|
|
USER user |
|
|
|
|
|
CMD ["bash", "start.sh"] |
|
|