diff --git a/workshop-1/app/like-service/Dockerfile b/workshop-1/app/like-service/Dockerfile index 8d51d14..b073b6e 100644 --- a/workshop-1/app/like-service/Dockerfile +++ b/workshop-1/app/like-service/Dockerfile @@ -1,13 +1,13 @@ FROM ubuntu:latest RUN echo Updating existing packages, installing and upgrading python and pip. RUN apt-get update -y -RUN apt-get install -y python-pip python-dev build-essential -RUN pip install --upgrade pip +RUN apt-get install -y python3-pip python-dev build-essential +RUN pip3 install --upgrade pip RUN echo Copying the Mythical Mysfits Flask service into a service directory. COPY ./service /MythicalMysfitsService WORKDIR /MythicalMysfitsService RUN echo Installing Python packages listed in requirements.txt -RUN pip install -r ./requirements.txt +RUN pip3 install -r ./requirements.txt RUN echo Starting python and starting the Flask service... -ENTRYPOINT ["python"] +ENTRYPOINT ["python3"] CMD ["mysfits_like.py"] diff --git a/workshop-1/app/like-service/service/mysfits_like.py b/workshop-1/app/like-service/service/mysfits_like.py index 97a69b7..9fba36f 100644 --- a/workshop-1/app/like-service/service/mysfits_like.py +++ b/workshop-1/app/like-service/service/mysfits_like.py @@ -3,7 +3,7 @@ import os import sys import requests -from urlparse import urlparse +from urllib.parse import urlparse from flask import Flask, jsonify, json, Response, request from flask_cors import CORS diff --git a/workshop-1/app/like-service/service/requirements.txt b/workshop-1/app/like-service/service/requirements.txt index c4e2179..46e9218 100644 --- a/workshop-1/app/like-service/service/requirements.txt +++ b/workshop-1/app/like-service/service/requirements.txt @@ -1,3 +1,3 @@ Flask==1.0.0 flask-cors==3.0.0 -requests==1.2.3 +requests==2.20.0 diff --git a/workshop-1/app/monolith-service/Dockerfile.draft b/workshop-1/app/monolith-service/Dockerfile.draft index a0f2859..75671e7 100644 --- a/workshop-1/app/monolith-service/Dockerfile.draft +++ b/workshop-1/app/monolith-service/Dockerfile.draft @@ -1,7 +1,7 @@ FROM ubuntu:latest RUN apt-get update -y -RUN apt-get install -y python-pip python-dev build-essential -RUN pip install --upgrade pip +RUN apt-get install -y python3-pip python-dev build-essential +RUN pip3 install --upgrade pip #[TODO]: Copy python source files and requirements file into container image #[TODO]: Install dependencies listed in the requirements.txt file using pip