2022-11-20 06:45:47 +00:00
|
|
|
FROM library/python:3.10
|
2022-11-21 05:00:12 +00:00
|
|
|
MAINTAINER Reid 'arrdem' McKenzie <me@arrdem.com>
|
2022-11-20 06:45:47 +00:00
|
|
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
2022-11-21 05:00:12 +00:00
|
|
|
RUN useradd -d /app app
|
|
|
|
RUN mkdir -p /app
|
2022-11-20 06:45:47 +00:00
|
|
|
RUN chown -R app:app /app
|
|
|
|
USER app
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PATH="/app/.local/bin:${PATH}"
|
|
|
|
ENV PYTHONPATH="/app:${PYTHONPATH}"
|
2022-11-21 05:34:07 +00:00
|
|
|
# Trivialize detecting dockerization
|
|
|
|
ENV DOCKER_RUNNING=true
|
2022-11-20 06:45:47 +00:00
|
|
|
|
|
|
|
### App specific crap
|
|
|
|
# Deps vary least so do them first
|
2022-11-21 05:00:12 +00:00
|
|
|
RUN pip install --user install aiohttp aiohttp_basicauth async_lru cachetools click pycryptodome pyyaml retry
|
2022-11-20 06:45:47 +00:00
|
|
|
|
2022-11-21 05:34:07 +00:00
|
|
|
COPY --chown=app:app src/python relay.yaml relay.jsonld .
|
2022-11-20 06:45:47 +00:00
|
|
|
|
2022-11-21 05:34:07 +00:00
|
|
|
CMD ["python3", "relay/__main__.py", "-c", "relay.yaml", "run"]
|