orchestracities/ngsi-timeseries-api

Broken Docker image

c0c0n3 opened this issue · 1 comments

Describe the bug

The Docker image failed to build in a recent PR, #654. It looks like the problem could be the Docker build is installing a new version of pipenv which does not have the -r option.

Expected behavior

The Docker image should build on CircleCI.

Additional context

Here's the error on CircleCI from #654. It happened when running this command to build the image:

docker build -t orchestracities/quantumleap .

output:

#!/bin/bash -eo pipefail
docker build -t orchestracities/quantumleap .
Sending build context to Docker daemon  10.78MB
Step 1/19 : FROM python:3.8.5-alpine3.12 as base
3.8.5-alpine3.12: Pulling from library/python

fa9351a1: Pulling fs layer 
adc4ff6f: Pulling fs layer 
f1bb9eba: Pulling fs layer 
8f72d6a9: Pulling fs layer 
Digest: sha256:cbc08bfc4b1b732076742f52852ede090e960ab7470d0a60ee4f964cfa7c710a
Status: Downloaded newer image for python:3.8.5-alpine3.12
 ---> 0f03316d4a27
Step 2/19 : FROM base as builder
 ---> 0f03316d4a27
Step 3/19 : RUN apk --no-cache --update-cache add gcc python3 python3-dev py-pip build-base wget
 ---> Running in 9be21c5eb01f
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/53) Upgrading musl (1.1.24-r9 -> 1.1.24-r10)
(2/53) Installing libgcc (9.3.0-r2)
(3/53) Installing libstdc++ (9.3.0-r2)
(4/53) Installing binutils (2.34-r2)
(5/53) Installing libmagic (5.38-r0)
(6/53) Installing file (5.38-r0)
(7/53) Installing gmp (6.2.1-r1)
(8/53) Installing isl (0.18-r0)
(9/53) Installing libgomp (9.3.0-r2)
(10/53) Installing libatomic (9.3.0-r2)
(11/53) Installing libgphobos (9.3.0-r2)
(12/53) Installing mpfr4 (4.0.2-r4)
(13/53) Installing mpc1 (1.1.0-r1)
(14/53) Installing gcc (9.3.0-r2)
(15/53) Installing musl-dev (1.1.24-r10)
(16/53) Installing libc-dev (0.7.2-r3)
(17/53) Installing g++ (9.3.0-r2)
(18/53) Installing make (4.3-r0)
(19/53) Installing fortify-headers (1.1-r0)
(20/53) Installing patch (2.7.6-r7)
(21/53) Installing build-base (0.5-r2)
(22/53) Installing python3 (3.8.10-r0)
(23/53) Installing py3-appdirs (1.4.4-r1)
(24/53) Installing py3-ordered-set (4.0.1-r0)
(25/53) Installing py3-parsing (2.4.7-r0)
(26/53) Installing py3-six (1.15.0-r0)
(27/53) Installing py3-packaging (20.4-r0)
(28/53) Installing py3-setuptools (47.0.0-r0)
(29/53) Installing py3-chardet (3.0.4-r4)
(30/53) Installing py3-idna (2.9-r0)
(31/53) Installing py3-certifi (2020.4.5.1-r0)
(32/53) Installing py3-urllib3 (1.25.9-r0)
(33/53) Installing py3-requests (2.23.0-r0)
(34/53) Installing py3-msgpack (1.0.0-r0)
(35/53) Installing py3-lockfile (0.12.2-r3)
(36/53) Installing py3-cachecontrol (0.12.6-r0)
(37/53) Installing py3-colorama (0.4.3-r0)
(38/53) Installing py3-distlib (0.3.0-r0)
(39/53) Installing py3-distro (1.5.0-r1)
(40/53) Installing py3-webencodings (0.5.1-r3)
(41/53) Installing py3-html5lib (1.0.1-r4)
(42/53) Installing py3-pytoml (0.1.21-r0)
(43/53) Installing py3-pep517 (0.8.2-r0)
(44/53) Installing py3-progress (1.5-r0)
(45/53) Installing py3-toml (0.10.1-r0)
(46/53) Installing py3-retrying (1.3.3-r0)
(47/53) Installing py3-contextlib2 (0.6.0-r0)
(48/53) Installing py3-pip (20.1.1-r0)
(49/53) Installing pkgconf (1.7.2-r0)
(50/53) Installing python3-dev (3.8.10-r0)
(51/53) Installing libunistring (0.9.10-r0)
(52/53) Installing libidn2 (2.3.0-r0)
(53/53) Installing wget (1.20.3-r1)
Executing busybox-1.31.1-r16.trigger
OK: 318 MiB in 87 packages
Removing intermediate container 9be21c5eb01f
 ---> 071ae17cb553
Step 4/19 : RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
 ---> Running in 5691218ede20
Removing intermediate container 5691218ede20
 ---> 82699ab3b47e
Step 5/19 : RUN pip install pipenv
 ---> Running in 5629e7fa9ca1
Collecting pipenv
  Downloading pipenv-2022.8.19-py2.py3-none-any.whl (3.4 MB)
Collecting certifi
  Downloading certifi-2022.6.15-py3-none-any.whl (160 kB)
Collecting virtualenv-clone>=0.2.5
  Downloading virtualenv_clone-0.5.7-py3-none-any.whl (6.6 kB)
Collecting virtualenv
  Downloading virtualenv-20.16.3-py2.py3-none-any.whl (8.8 MB)
Requirement already satisfied: setuptools>=36.2.1 in /usr/local/lib/python3.8/site-packages (from pipenv) (50.3.0)
Collecting platformdirs<3,>=2.4
  Downloading platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting distlib<1,>=0.3.5
  Downloading distlib-0.3.5-py2.py3-none-any.whl (466 kB)
Collecting filelock<4,>=3.4.1
  Downloading filelock-3.8.0-py3-none-any.whl (10 kB)
Installing collected packages: certifi, virtualenv-clone, platformdirs, distlib, filelock, virtualenv, pipenv
Successfully installed certifi-2022.6.15 distlib-0.3.5 filelock-3.8.0 pipenv-2022.8.19 platformdirs-2.5.2 virtualenv-20.16.3 virtualenv-clone-0.5.7
WARNING: You are using pip version 20.2.3; however, version 22.2.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Removing intermediate container 5629e7fa9ca1
 ---> 9fa87aa3b6a1
Step 6/19 : RUN mkdir -p /src/ngsi-timeseries-api
 ---> Running in 1a2ace8fe3a1
Removing intermediate container 1a2ace8fe3a1
 ---> d1bfc836a615
Step 7/19 : COPY Pipfile /src/ngsi-timeseries-api/Pipfile
 ---> 4cc8b1cdcaae
Step 8/19 : COPY Pipfile.lock /src/ngsi-timeseries-api/Pipfile.lock
 ---> b815cd6c2136
Step 9/19 : RUN cd /src/ngsi-timeseries-api && { pipenv lock -r > /requirements.txt; }
 ---> Running in 09e61313cb28
Usage: pipenv lock [OPTIONS]
Try 'pipenv lock -h' for help.

Error: No such option: -r
The command '/bin/sh -c cd /src/ngsi-timeseries-api && { pipenv lock -r > /requirements.txt; }' returned a non-zero code: 2

Exited with code exit status 2
CircleCI received exit code 2

closed by #677