Merge lp:~jelmer/loggerhead/docker into lp:loggerhead

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Colin Watson
Approved revision: 514
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~jelmer/loggerhead/docker
Merge into: lp:loggerhead
Diff against target: 17 lines (+13/-0)
1 file modified
Dockerfile (+13/-0)
To merge this branch: bzr merge lp:~jelmer/loggerhead/docker
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+403635@code.launchpad.net

Commit message

Add a basic Dockerfile for loggerhead.

Description of the change

Add a basic docker file for loggerhead.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks!

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Fri, Jun 11, 2021 at 03:45:25PM -0000, Otto Co-Pilot wrote:
> Running landing tests failed
> https://jenkins.ols.canonical.com/online-services/job/loggerhead/11/

Colin, happy to help debug this if necessary. I can't actually view
the logs though, so unsure if this is a problem with my merge proposal
or not.

--
Jelmer Vernooij <email address hidden>
PGP Key: https://www.jelmer.uk/D729A457.asc

Revision history for this message
Colin Watson (cjwatson) wrote :

Yep, sorry about that! The relevant bit of the failure is:

15:43:38 O: Collecting breezy (from -r requirements.txt (line 6))
15:43:38 O: Downloading https://files.pythonhosted.org/packages/09/71/b75b6f8872516a3fb5fa20f98f32097ac126a847cb90c5c9189fac5e47f9/breezy-3.2.0.tar.gz (9.4MB)
15:43:38 O: Complete output from command python setup.py egg_info:
15:43:38 O: [ERROR] Not a supported Python version. Need 3.5+

... so I guess that loggerhead needs to pin a version of breezy that supports Python 2 when it is running on Python 2 itself.

(It's a shame that breezy doesn't declare `python_requires` so that pip could figure this out for itself.)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Fri, Jun 11, 2021 at 04:36:57PM -0000, Colin Watson wrote:
> Yep, sorry about that! The relevant bit of the failure is:
>
> 15:43:38 O: Collecting breezy (from -r requirements.txt (line 6))
> 15:43:38 O: Downloading https://files.pythonhosted.org/packages/09/71/b75b6f8872516a3fb5fa20f98f32097ac126a847cb90c5c9189fac5e47f9/breezy-3.2.0.tar.gz (9.4MB)
> 15:43:38 O: Complete output from command python setup.py egg_info:
> 15:43:38 O: [ERROR] Not a supported Python version. Need 3.5+
>
> ... so I guess that loggerhead needs to pin a version of breezy that supports Python 2 when it is running on Python 2 itself.
https://code.launchpad.net/~jelmer/loggerhead/pin-breezy should do this

> (It's a shame that breezy doesn't declare `python_requires` so that pip could figure this out for itself.)
Ah, that's a good point. I've submitted a merge proposal to set that.

Cheers,

Jelmer

--
Jelmer Vernooij <email address hidden>
PGP Key: https://www.jelmer.uk/D729A457.asc

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'Dockerfile'
--- Dockerfile 1970-01-01 00:00:00 +0000
+++ Dockerfile 2021-06-02 16:18:21 +0000
@@ -0,0 +1,13 @@
1FROM debian:sid
2
3# Simple docker file for loggerhead
4# To use, mount something on /code
5# TODO(jelmer): Support toggling --export-tarballs
6# TODO(jelmer): Support toggling whether writes are allowed (currently not allowed)
7# TODO(jelmer): Support specifying host prefix
8
9RUN apt update && apt install --no-install-recommends -y python3 python3-bleach python3-paste python3-pip python3-patiencediff python3-simpletal python3-dev build-essential python3-pastedeploy python3-dulwich python3-certifi python3-configobj && pip3 install breezy && apt clean && mkdir -p /logs
10ADD . /opt/loggerhead
11ENV PYTHONPATH=/opt/loggerhead
12EXPOSE 8080/tcp
13ENTRYPOINT ["/usr/bin/python3", "/opt/loggerhead/loggerhead-serve", "/code", "--host=0.0.0.0", "--port=8080", "--log-folder=/logs", "--export-tarballs", "--cache-dir=/tmp", "--prefix=/"]

Subscribers

People subscribed via source and target branches