Skip to content

Commit

Permalink
fix for workshop3 app and dockerfiles for python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
amui committed Mar 12, 2021
1 parent cf55c48 commit e91693b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions workshop-3/app/like-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion workshop-3/app/like-service/service/mysfits_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
import logging
import random
from urlparse import urlparse
from urllib.parse import urlparse
from flask import Flask, jsonify, json, Response, request, abort
from flask_cors import CORS

Expand Down
2 changes: 1 addition & 1 deletion workshop-3/app/like-service/service/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Flask==1.0.0
flask-cors==3.0.0
requests==1.2.3
requests==2.20.0
8 changes: 4 additions & 4 deletions workshop-3/app/monolith-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 ["mythicalMysfitsService.py"]

0 comments on commit e91693b

Please sign in to comment.