-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
24 lines (16 loc) · 871 Bytes
/
Dockerfile.dev
File metadata and controls
24 lines (16 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.11
RUN apt-get update && apt-get install -y --no-install-recommends wget \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install poetry
# Setting the working directory
WORKDIR /app
COPY pyproject.toml ./
#Install the dependencies
RUN poetry install --no-root
# Copying our application into the container
COPY spamoverflow spamoverflow
# Get the version of spamhammer that matches the architecture of the container
RUN dpkg --print-architecture | grep -q "amd64" && export SPAMHAMMER_ARCH="amd64" || export SPAMHAMMER_ARCH="arm64" && wget https://github.com/CSSE6400/SpamHammer/releases/download/v1.0.0/spamhammer-v1.0.0-linux-${SPAMHAMMER_ARCH} -O spamoverflow/spamhammer && chmod +x spamoverflow/spamhammer
EXPOSE 6400
# Running our application
CMD ["poetry", "run", "flask", "--app", "spamoverflow", "run", "--host", "0.0.0.0", "--port", "6400"]