Browse 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 4 years ago
parent
commit
52d78aa04f
2 changed files with 16 additions and 3 deletions
  1. 6 3
      Dockerfile
  2. 10 0
      docker-compose.yml

+ 6 - 3
Dockerfile View File

1
 FROM node:7
1
 FROM node:7
2
 # FROM ubuntu:16.04
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
 RUN mkdir -p /usr/src/app
9
 RUN mkdir -p /usr/src/app
7
 WORKDIR /usr/src/app
10
 WORKDIR /usr/src/app
8
 COPY package.json /usr/src/app/
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
 COPY package.json* yarn.lock* .npmrc* /usr/src/app/
14
 COPY package.json* yarn.lock* .npmrc* /usr/src/app/
12
 RUN npm install --production
15
 RUN npm install --production
13
 
16
 

+ 10 - 0
docker-compose.yml View File

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/"