Skip to content

Commit c057484

Browse files
committed
Update Dockerfile for GraphQL lab to pin dependency versions
- Adjusted the Dockerfile to pin specific versions of dependencies to ensure compatibility with flask-graphql and graphene 2.x. - Included constraints for werkzeug and markupsafe to prevent installation issues related to version incompatibilities.
1 parent a944829 commit c057484

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

additional-labs/GraphQL/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ FROM python:3.9-slim
44
WORKDIR /app
55

66
# Install the dependencies
7-
RUN pip install flask graphene flask-graphql werkzeug
7+
# Pin versions to ensure compatibility with flask-graphql and graphene 2.x
8+
# flask-graphql is not compatible with graphene 3.x or werkzeug 2.2+
9+
# markupsafe<2.1.0 is needed because soft_unicode was removed in 2.1.0
10+
RUN pip install "graphene<3" "flask-graphql" "flask<2.2" "werkzeug<2.2" "markupsafe<2.1.0"
811

912
# Copy the app.py file
1013
COPY app.py .
1114

1215
EXPOSE 5023
1316

1417
CMD ["python", "app.py"]
15-

0 commit comments

Comments
 (0)