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