all
This commit is contained in:
21
container-bridge/Dockerfile
Normal file
21
container-bridge/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Build context must be orderpy-bridge (parent), e.g. docker-compose with context: . and dockerfile: container-bridge/Dockerfile
|
||||
FROM python:3.11-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gosu \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd --create-home --uid 1000 app
|
||||
WORKDIR /app
|
||||
|
||||
COPY bridge_core /app/bridge_core
|
||||
COPY container-bridge/requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY container-bridge/main.py /app/main.py
|
||||
COPY container-bridge/docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||
RUN chmod +x /app/docker-entrypoint.sh
|
||||
RUN mkdir -p /app/data && chown -R app:app /app/data
|
||||
|
||||
ENV ORDERPY_KEY_PATH=/app/data/bridge_key.pem
|
||||
EXPOSE 8080 8088
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user