Test2 / Dockerfile
johnpaulbin's picture
Update Dockerfile
7b871fe
raw
history blame
1 kB
# Using python:3.9 as a base image
FROM python:3.9
# Setting up the necessary packages and dependencies
RUN apt-get update && \
apt-get install -y libpcre++-dev qttools5-dev qtbase5-dev libqt5svg5-dev libarchive-dev libpcre2-dev wget && \
wget https://github.com/XapaJIaMnu/translateLocally/releases/download/latest/translateLocally-v0.0.2+136745e-Ubuntu-20.04.AVX.deb && \
dpkg -i translateLocally-v0.0.2+136745e-Ubuntu-20.04.AVX.deb || true && \
apt-get install -f -y
# Setting up the working directory and adding a new user named "user"
WORKDIR /home/user/app
RUN useradd -m -u 1000 user
# Switching to the "user" user and setting environment variables
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Installing the requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copying the current directory contents into the container
COPY --chown=user . .
# Running the Flask application
CMD ["python", "app.py"]