source/projects/activitypub_relay/Dockerfile

27 lines
653 B
Docker
Raw Normal View History

2022-11-20 06:45:47 +00:00
FROM library/python:3.10
MAINTAINER Reid 'arrdem' McKenzie <me@arrdem.com>
2022-11-20 06:45:47 +00:00
RUN pip install --upgrade pip
RUN useradd -d /app app
2022-11-27 03:05:35 +00:00
RUN mkdir -p /app /data
RUN chown -R app:app /app /data
2022-11-20 06:45:47 +00:00
USER app
WORKDIR /app
VOLUME /data
ENV DOCKER_RUNNING=true
2022-11-20 06:45:47 +00:00
ENV PYTHONPATH="/app:${PYTHONPATH}"
2022-11-27 03:05:35 +00:00
ENV PYTHONUNBUFFERED=true
ENV PATH="/app/.local/bin:${PATH}"
2022-11-20 06:45:47 +00:00
### App specific crap
# Deps vary least so do them first
2022-11-26 22:46:42 +00:00
RUN pip3 install --user install aiohttp aiohttp_basicauth async_lru cachetools click pycryptodome pyyaml retry
2022-11-20 06:45:47 +00:00
COPY --chown=app:app docker_relay.sh /app/relay.sh
COPY --chown=app:app src/python /app/
2022-11-20 06:45:47 +00:00
EXPOSE 8080
2022-11-27 03:05:35 +00:00
CMD ["/bin/sh", "/app/relay.sh"]