Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions role-change-detection-py/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# Build stage: compile Python dependencies
FROM python:3.9-alpine as builder
FROM python:3.10-alpine as builder
RUN apk update
RUN apk add alpine-sdk
RUN python3 -m pip install --upgrade pip
COPY requirements.txt ./
COPY forta_bot-0.2.0.tar.gz ./
RUN python3 -m pip install --user -r requirements.txt

# Final stage: copy over Python dependencies and install production Node dependencies
FROM node:12-alpine
# this python version should match the build stage python version
RUN apk add python3
# Final stage: copy over Python dependencies
FROM python:3.10-alpine
COPY --from=builder /root/.local /root/.local
ENV PATH=/root/.local:$PATH
ENV NODE_ENV=production
# Uncomment the following line to enable agent logging
ENV FORTA_ENV=production
# Uncomment the following line to enable logging
LABEL "network.forta.settings.agent-logs.enable"="true"
WORKDIR /app
COPY ./src ./src
COPY ./LICENSE.md ./
COPY package*.json ./
RUN npm ci --production
CMD [ "npm", "run", "start:prod" ]
COPY LICENSE.md ./
CMD [ "python3", "./src/agent.py" ]
Loading