Parcourir la source

update Dockerfile to deal with Jessie backports issue as outlined in https://unix.stackexchange.com/questions/508724/failed-to-fetch-jessie-backports-repository. Also adding a docker-compose.yml for development.

Scott Blumenthal il y a 4 ans
Parent
révision
52d78aa04f
2 fichiers modifiés avec 16 ajouts et 3 suppressions
  1. 6 3
      Dockerfile
  2. 10 0
      docker-compose.yml

+ 6 - 3
Dockerfile Voir le fichier

@@ -1,13 +1,16 @@
1 1
 FROM node:7
2 2
 # FROM ubuntu:16.04
3 3
 
4
-RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' >> /etc/apt/sources.list
4
+RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
5
+RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
6
+RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
7
+RUN apt-get -o Acquire::Check-Valid-Until=false update
5 8
 
6 9
 RUN mkdir -p /usr/src/app
7 10
 WORKDIR /usr/src/app
8 11
 COPY package.json /usr/src/app/
9
-RUN apt-get update -y && apt-get upgrade -y && \
10
-    apt-get install -y nodejs npm libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev libpng-dev build-essential g++ ffmpeg
12
+RUN apt-get -o Acquire::Check-Valid-Until=false update -y && apt-get upgrade -y && \
13
+  apt-get install -y nodejs npm libcairo2-dev libjpeg62-turbo-dev libpango1.0-dev libgif-dev libpng-dev build-essential g++ ffmpeg
11 14
 COPY package.json* yarn.lock* .npmrc* /usr/src/app/
12 15
 RUN npm install --production
13 16
 

+ 10 - 0
docker-compose.yml Voir le fichier

@@ -0,0 +1,10 @@
1
+version: "3"
2
+services:
3
+  web:
4
+    build: "."
5
+    ports:
6
+      - "80:8888"
7
+    volumes:
8
+      - "./settings:/usr/src/app/settings/"
9
+      - "./lib:/usr/src/app/lib/"
10
+      - "./server:/usr/src/app/server/"