Created
March 11, 2023 00:22
-
-
Save Jaxmetalmax/3a8dca1374f5fe6bcc3a287d6f9748c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For more information, please refer to https://aka.ms/vscode-docker-python | |
FROM python:3.11.2-buster | |
# Keeps Python from generating .pyc files in the container | |
ENV PYTHONDONTWRITEBYTECODE=1 | |
# Turns off buffering for easier container logging | |
ENV PYTHONUNBUFFERED=1 | |
# Install pip requirements | |
COPY requirements.txt . | |
RUN python -m pip install -r requirements.txt | |
WORKDIR /app | |
COPY . /app | |
# Creates a non-root user with an explicit UID and adds permission to access the /app folder | |
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers | |
RUN groupadd -g 1000 appuser \ | |
&& useradd --no-log-init --shell /bin/bash -u 1000 -g 1000 -o -c "" -m appuser \ | |
&& cp -r /etc/skel/. /home/appuser \ | |
&& chown -R 1000:1000 /home/appuser | |
USER appuser | |
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug | |
CMD ["python", "ghstdurl.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment