Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (24 sloc) 712 Bytes
FROM python:3-stretch
WORKDIR /app
ENV LANG=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install OS package dependencies.
# Do all of this in one RUN to limit final image size.
RUN apt-get update && \
apt-get install -y --no-install-recommends gettext build-essential && \
rm -rf /var/lib/apt/lists/*
# Install Python deps
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
ENV PORT=8000
# add non-priviledged user
RUN adduser --uid 1000 --disabled-password --gecos '' --no-create-home webdev
WORKDIR /app
EXPOSE 8000
CMD ["python", "app.py"]
COPY ./static ./static
COPY ./templates ./templates
COPY ./app.py ./
RUN chown webdev.webdev -R .
USER webdev
You can’t perform that action at this time.