This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
twitter_media_tool/Dockerfile

35 lines
763 B
Text
Raw Permalink Normal View History

2020-04-25 17:09:07 -05:00
# Pull Python 3.8.1 on alpine
FROM python:3.8.1-alpine
RUN apk --no-cache add gcc \
musl-dev \
python3-dev \
g++ \
libxslt-dev
# Create a new user to run as and set the working directory
ENV USER=twitter_media_tool
ENV UID=991
ENV GID=991
RUN addgroup -g "${GID}" twitter_media_tool
RUN adduser \
--disabled-password \
--gecos "" \
--home "/home/twitter_media_tool" \
--ingroup "${USER}" \
--uid "${UID}" \
"${USER}"
USER twitter_media_tool
WORKDIR /home/twitter_media_tool/
ENV PATH="${PATH}:/home/twitter_media_tool/.local/bin"
COPY Pipfile Pipfile
RUN pip install pipenv
RUN pipenv install Pipfile
COPY twitter_media_tool.py twitter_media_tool.py
ENTRYPOINT [ "pipenv", "run", "python", "twitter_media_tool.py" ]