Skip to content

Commit e91693b

Browse files
committed
fix for workshop3 app and dockerfiles for python 3
1 parent cf55c48 commit e91693b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM ubuntu:latest
22
RUN echo Updating existing packages, installing and upgrading python and pip.
33
RUN apt-get update -y
4-
RUN apt-get install -y python-pip python-dev build-essential
5-
RUN pip install --upgrade pip
4+
RUN apt-get install -y python3-pip python-dev build-essential
5+
RUN pip3 install --upgrade pip
66
RUN echo Copying the Mythical Mysfits Flask service into a service directory.
77
COPY ./service /MythicalMysfitsService
88
WORKDIR /MythicalMysfitsService
99
RUN echo Installing Python packages listed in requirements.txt
10-
RUN pip install -r ./requirements.txt
10+
RUN pip3 install -r ./requirements.txt
1111
RUN echo Starting python and starting the Flask service...
12-
ENTRYPOINT ["python"]
12+
ENTRYPOINT ["python3"]
1313
CMD ["mysfits_like.py"]

workshop-3/app/like-service/service/mysfits_like.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
import logging
88
import random
9-
from urlparse import urlparse
9+
from urllib.parse import urlparse
1010
from flask import Flask, jsonify, json, Response, request, abort
1111
from flask_cors import CORS
1212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Flask==1.0.0
22
flask-cors==3.0.0
3-
requests==1.2.3
3+
requests==2.20.0
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM ubuntu:latest
22
RUN echo Updating existing packages, installing and upgrading python and pip.
33
RUN apt-get update -y
4-
RUN apt-get install -y python-pip python-dev build-essential
5-
RUN pip install --upgrade pip
4+
RUN apt-get install -y python3-pip python-dev build-essential
5+
RUN pip3 install --upgrade pip
66
RUN echo Copying the Mythical Mysfits Flask service into a service directory.
77
COPY ./service /MythicalMysfitsService
88
WORKDIR /MythicalMysfitsService
99
RUN echo Installing Python packages listed in requirements.txt
10-
RUN pip install -r ./requirements.txt
10+
RUN pip3 install -r ./requirements.txt
1111
RUN echo Starting python and starting the Flask service...
12-
ENTRYPOINT ["python"]
12+
ENTRYPOINT ["python3"]
1313
CMD ["mythicalMysfitsService.py"]

0 commit comments

Comments
 (0)