-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (41 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
53 lines (41 loc) · 1.1 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
ARG SOURCE_REPO=https://github.com/openagri-eu/openagri-gatekeeper
# Use an official Python runtime as a parent image
FROM python:3.12
LABEL org.opencontainers.image.source=${SOURCE_REPO}
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory to /var/www
WORKDIR /var/www
# Update and upgrade the package manager
RUN apt-get update && \
apt-get install -y \
sudo \
vim \
nano \
curl \
wget \
unzip \
git \
iputils-ping \
net-tools \
libpq-dev \
dnsutils \
build-essential \
default-mysql-client \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create the directory for log files
RUN mkdir -p /var/www/logs
RUN chown -R www-data:www-data /var/www/logs
# Upgrade pip
RUN pip install --upgrade pip
COPY requirements.txt /var/www/
RUN pip install -r requirements.txt
# Copy the current directory contents into the container at /var/www
COPY . /var/www
EXPOSE 9000
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
# Set the entrypoint
ENTRYPOINT ["entrypoint.sh"]