Electricitymap-contrib: Can't build docker image. Failing to fetch

Created on 1 Apr 2019  Â·  4Comments  Â·  Source: tmrowco/electricitymap-contrib

Hi,

When trying to run docker-compose run --rm web npm run watch I get the following output:

```Starting electricitymap-contrib_mockserver_1 ... done
Building web
Step 1/20 : FROM node:10.9.0
---> a860762a13bc
Step 2/20 : WORKDIR /home/web
---> Running in 998280c81e0a
Removing intermediate container 998280c81e0a
---> aeb594e912d4
Step 3/20 : RUN apt-get update && apt-get install -y unzip
---> Running in 117706d1ea48
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Ign http://deb.debian.org jessie-updates InRelease
Get:2 http://deb.debian.org jessie Release.gpg [2420 B]
Ign http://deb.debian.org jessie-updates Release.gpg
Get:3 http://deb.debian.org jessie Release [148 kB]
Ign http://deb.debian.org jessie-updates Release
Err http://deb.debian.org jessie-updates/main amd64 Packages

Get:4 http://security.debian.org jessie/updates/main amd64 Packages [825 kB]
Get:5 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages
404 Not Found
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Fetched 10.1 MB in 5s (2018 kB/s)
ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y unzip' returned a non-zero code: 100
```

Which can be related with this stackoverflow post (5 days old) where the answer explains that this packages have been moved to the debian.archive.

Maybe the dockerfile needs and update link?
Change http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages
with http://archive.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages

My system is macOS 10.14 with Docker desktop.

Most helpful comment

The Docker file has just been updated. I suggest you pull the latest master version and it should work!

All 4 comments

The Docker file has just been updated. I suggest you pull the latest master version and it should work!

Hey! thanks for the quick answer it did solve my first issue.

Im now getting stuck when running the docker compose. This is my output:

jaime@Jaimes-MacBook-Pro  ~/Documents/Github/electricitymap-contrib   master 0.106.0 ↑6  docker-compose run --rm web npm run watch
Starting electricitymap-contrib_mockserver_1 ... done

> [email protected] watch /home/web
> webpack --watch --progress --mode development

 10% building modules 1/1 modules 0 active
Webpack is watching the files…

(node:17) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Hash: 6f4e6b3e5e8aeaa21578
Version: webpack 4.16.5
Time: 6348ms
Built at: 04/01/2019 10:31:56 AM
         Asset      Size  Chunks             Chunk Names
 bundle.dev.js  1.26 MiB  bundle  [emitted]  bundle
 styles.dev.js  6.44 KiB  styles  [emitted]  styles
 vendor.dev.js  2.73 MiB  vendor  [emitted]  vendor
styles.dev.css  43.9 KiB  styles  [emitted]  styles
vendor.dev.css  29.8 KiB  vendor  [emitted]  vendor
[./node_modules/css-loader/index.js?!./src/styles.css] ./node_modules/css-loader??ref--4-2!./src/styles.css 46.2 KiB [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {vendor} [built]
[./src/helpers/constants.js] 921 bytes {bundle} [built]
[./src/helpers/grib.js] 1.24 KiB {bundle} [built]
[./src/helpers/historystate.js] 2.71 KiB {bundle} [built]
[./src/helpers/scales.js] 1.57 KiB {bundle} [built]
[./src/helpers/themes.js] 832 bytes {bundle} [built]
[./src/helpers/tooltip.js] 9.72 KiB {bundle} [built]
[0] multi babel-polyfill ./src/main.js 40 bytes {bundle} [built]
[./src/helpers/translation.js] 1.49 KiB {bundle} [built]
[./src/main.js] 55.2 KiB {bundle} [built]
[./src/services/dataservice.js] 3.83 KiB {bundle} [built]
[./src/services/loadingservice.js] 864 bytes {bundle} [built]
[./src/services/thirdparty.js] 2.74 KiB {bundle} [built]
[./src/store.js] 1.51 KiB {bundle} [built]
    + 1024 hidden modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--4-2!node_modules/mapbox-gl/dist/mapbox-gl.css:
       2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--4-2!src/styles.css:
    [./node_modules/css-loader/index.js?!./src/styles.css] ./node_modules/css-loader??ref--4-2!./src/styles.css 46.2 KiB {0} [built]
        + 1 hidden module

It get's stuck on this step on two different machines I tested it so far. Is this supposed to take a long time? @corradio

That's expected! The npm run watch command keeps running forever and watches changes you make in the code to recompile the frontend.
Alongside the watch command you will need to open a new terminal with docker-compose up --build.
Feel free to update the README if that wasn't clear enough!

Olivier

Great! I already submitted a pr. Since this issue is solved I'll close the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jzlcdh picture jzlcdh  Â·  5Comments

systemcatch picture systemcatch  Â·  5Comments

alixunderplatz picture alixunderplatz  Â·  3Comments

corradio picture corradio  Â·  5Comments

Alain-Ivadolabs-Ext picture Alain-Ivadolabs-Ext  Â·  4Comments