-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 992 Bytes
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 992 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.8-slim
# Set environment variables
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
POETRY_VERSION=1.7.1 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_HOME="/opt/poetry" \
PATH="/opt/poetry/bin:$PATH"
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python3 - \
&& chmod +x /opt/poetry/bin/poetry
# Set working directory
WORKDIR /app
# Copy project files
COPY pyproject.toml poetry.lock ./
# Install dependencies
RUN poetry install --no-dev --no-root
# Copy the application code
COPY . .
# Install the project
RUN poetry install --no-dev
# Command to run the application
CMD ["python", "-m", "gandalf_linkedin.main"]