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

change the docker image from 16.10 to 17.10 #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.10
FROM ubuntu:17.10

RUN apt-get update && \
apt install -y software-properties-common && \
Expand All @@ -10,7 +10,8 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# gsutil is installed to deploy the book to Google Cloud Storage
RUN pip2 install --upgrade pip && pip2 install gsutil
RUN pip install --upgrade pip
RUN pip install gsutil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this will work? gsutil is only available on Python 2 as far as I recall.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, gsutil is only supported for py 2.7 however the build of the docker does work. The Dockerfile in master is not working for me.
I don't use Cloud Storage personally so I cannot confirm if everything will work as expected.

Do you have any commands I can run just to see if everything works as expected ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from this one, all your fixes seem correct to me. If you revert this one change, just it build for you?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it doesn't work, see the error I have when running docker-compose build.
I also tested with a full re-installation.

Traceback (most recent call last):
  File "/usr/bin/pip2", line 9, in <module>
    from pip import main
ImportError: cannot import name main
ERROR: Service 'book_builder' failed to build: The command '/bin/sh -c pip2 install --upgrade pip && pip2 install gsutil' returned a non-zero code: 1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think I see what might be happening. Does this version of Ubuntu switch to Python 3 as a default Python? If so, we may have to create both Python 2 and Python 3 virtual environments.


# Make sure Python 3.6 is the default
RUN ln -sf /usr/bin/python3.6 /usr/bin/python && \
Expand All @@ -23,7 +24,7 @@ RUN pip install --upgrade pip ipykernel && \
python -m ipykernel install --user

# Install dependencies for HTMLBook build
RUN ln -s /usr/bin/nodejs /usr/bin/node && \
RUN ln -s /usr/bin/node && \
npm install -g htmlbook

# Download big data files
Expand Down