This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Debian Jessie directly as base image
- Loading branch information
Showing
5 changed files
with
27 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,7 @@ | |
dev.js | ||
npm-debug.log | ||
|
||
bin/ | ||
test/ | ||
src/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
FROM node:slim | ||
FROM buildpack-deps:jessie-curl | ||
|
||
MAINTAINER Mihkel Sokk <[email protected]> | ||
|
||
ENV RENDERER_ACCESS_KEY=changeme CONCURRENCY=1 WINDOW_WIDTH=1024 WINDOW_HEIGHT=768 NODE_ENV=production | ||
ENV RENDERER_ACCESS_KEY=changeme CONCURRENCY=1 WINDOW_WIDTH=1024 WINDOW_HEIGHT=768 NODE_ENV=production \ | ||
ELECTRON_VERSION=0.36.7 ELECTRON_ENABLE_STACK_DUMPING=true ELECTRON_ENABLE_LOGGING=true | ||
|
||
# Add subpixel hinting | ||
COPY .fonts.conf /root/.fonts.conf | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
# Install the packages needed to run Electron | ||
RUN npm install --production && \ | ||
sed -i 's/main/main contrib/g' /etc/apt/sources.list && \ | ||
apt-get update && apt-get upgrade -y && apt-get install -y xvfb \ | ||
libgtk2.0-0 ttf-mscorefonts-installer libnotify4 libgconf2-4 libnss3 dbus-x11 && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
# Install the packages needed to run Electron | ||
RUN sed -i 's/main/main contrib/g' /etc/apt/sources.list && \ | ||
curl -sL https://deb.nodesource.com/setup_5.x | bash - && \ | ||
|
||
apt-get update && apt-get upgrade -y && \ | ||
apt-get install -y nodejs unzip xvfb libgtk2.0-0 ttf-mscorefonts-installer libnotify4 libgconf2-4 libnss3 dbus-x11 && \ | ||
|
||
# Get Electron | ||
wget "https://github.com/atom/electron/releases/download/v${ELECTRON_VERSION}/electron-v${ELECTRON_VERSION}-linux-x64.zip" -O electron.zip && \ | ||
unzip electron.zip && rm electron.zip && \ | ||
|
||
# Install dependencies without electron-prebuilt | ||
sed -i '/electron-prebuilt/d' ./package.json && \ | ||
npm install --production && \ | ||
|
||
# Cleanup | ||
apt-get remove -y unzip nodejs && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
EXPOSE 3000 | ||
|
||
CMD xvfb-run --server-args="-screen 0 ${WINDOW_WIDTH}x${WINDOW_HEIGHT}x24" npm start | ||
CMD xvfb-run --server-args="-screen 0 ${WINDOW_WIDTH}x${WINDOW_HEIGHT}x24" ./electron --disable-gpu lib/server.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters