Skip to content

Commit 039a023

Browse files
committed
Clean Dockerfile a little
1 parent 2162c52 commit 039a023

2 files changed

Lines changed: 3 additions & 16 deletions

File tree

Dockerfile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
11
FROM python:3.12.7
22

3-
#this is the working directory in the container.
4-
WORKDIR /usr/src/META/Registrering
3+
WORKDIR /app
54

6-
#this is to prevent python from writing pyc file.
75
ENV PYTHONDONTWRITEBYTECODE 1
8-
#we add this to prevent python from buffering output to the terminal
96
ENV PYTHONUNBUFFERED 1
10-
#should we run a upgrade and install? feel free to let me know. RUN pip install --upgrade pip
117

12-
#As iv understood, this gives us the ability to reads and write to the networking using TCP, or UDP.
13-
RUN apt-get update && apt-get install -y netcat-openbsd && apt-get clean
8+
RUN apt-get update && apt-get install -y netcat-openbsd && rm -rf /var/lib/apt/lists/*
149

15-
#this just copies the requirements.txt file into the current directory.
1610
COPY ./requirements.txt .
1711
RUN pip install -r requirements.txt
1812

19-
#copies the entrypoint file.
2013
COPY ./entrypoint.sh .
2114

22-
#this is to make the entrypoint file executable. https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html
23-
RUN sed -i 's/\r$//g' entrypoint.sh
24-
25-
RUN chmod +x entrypoint.sh
26-
27-
#this just copies the django projext into the working dir.
2815
COPY . .
2916

30-
ENTRYPOINT [ "/usr/src/META/Registrering/entrypoint.sh"]
17+
ENTRYPOINT [ "/app/entrypoint.sh"]
3118

entrypoint.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)