Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfiles to build with python3, update urlparse import for … #32

Merged
merged 1 commit into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions workshop-1/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-1/app/like-service/service/mysfits_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion workshop-1/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
4 changes: 2 additions & 2 deletions workshop-1/app/monolith-service/Dockerfile.draft
Original file line number Diff line number Diff line change
@@ -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
Expand Down