Skip to content

Commit 0cb25e3

Browse files
committed
Add dockerfile description, fix permission problem
Signed-off-by: eyuen <eyuen@redhat.com>
1 parent c8ad2ca commit 0cb25e3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

docker/Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1+
####
2+
# This Dockerfile is used in order to build a container that runs the Spring Boot application
3+
#
4+
# Build the image with:
5+
#
6+
# docker build -f docker/Dockerfile -t python/sample-basic .
7+
#
8+
# Then run the container using:
9+
#
10+
# docker run -i --rm -p 8080:8080 python/sample-basic
11+
####
112
FROM python:slim
213

314
WORKDIR /projects
415
COPY . .
5-
RUN pip install --user -r requirements.txt
16+
17+
RUN python3 -m venv venv
18+
RUN . venv/bin/activate
19+
RUN pip install -r requirements.txt
620

721
EXPOSE 8080
8-
CMD [ "python", "app.py" ]
22+
CMD [ "python", "app.py"]
23+

0 commit comments

Comments
 (0)