Skip to content

Commit

Permalink
removing oak.log, Dockerfile cleanup, bumping to 5.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleardreamer committed Jan 25, 2019
1 parent d666224 commit 03277c0
Show file tree
Hide file tree
Showing 9 changed files with 268 additions and 635 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ node_modules/
.gitignore
.idea/
.vscode/
.travis.yml
circle.yml
build.sh
Dockerfile
Dockerfile.template
docker-deploy.sh
docker-compose.yml
readme.md
.cache/
build/
_config.yml
release
README.md
icon.png
docs/
examples/
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM node:10.14.2-stretch

ARG DEBIAN_FRONTEND=noninteractive
ARG NPM_REGISTRY_URL=https://registry.npmjs.org/

WORKDIR /opt/oak
COPY . /opt/oak

RUN apt-get update -q && apt-get install -y -q --no-install-recommends \
apt-utils \
Expand All @@ -20,25 +18,21 @@ RUN apt-get update -q && apt-get install -y -q --no-install-recommends \
libgtk3.0 \
libnotify4 \
libnss3 \
libudev-dev \
libusb-1.0-0 \
libusb-1.0.0-dev \
libxss1 \
libxtst6 \
libxcursor1 \
python \
udev
python

COPY . /opt/oak

RUN npm install --engine-strict=true --progress=false --loglevel="error" \
&& npm test \
RUN npm install --engine-strict=true \
&& npm link \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.electron

ENTRYPOINT ["oak"]
CMD ["--help"]

ENV npm_config_target=3.0.11 \
npm_config_runtime=electron \
Expand All @@ -48,7 +42,6 @@ ENV npm_config_target=3.0.11 \
NODE_ENV=production \
ELECTRON_VERSION=3.0.11 \
DISPLAY=:0 \
DEBUG=false \
IGNORE_GPU_BLACKLIST=false \
NODE_TLS_REJECT_UNAUTHORIZED=0 \
# nvidia card specific env vars
Expand Down
17 changes: 5 additions & 12 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM %%FROM%%

ARG DEBIAN_FRONTEND=noninteractive
ARG NPM_REGISTRY_URL=https://registry.npmjs.org/

WORKDIR /opt/oak
COPY . /opt/oak

RUN apt-get update -q && apt-get install -y -q --no-install-recommends \
apt-utils \
Expand All @@ -20,25 +18,21 @@ RUN apt-get update -q && apt-get install -y -q --no-install-recommends \
libgtk3.0 \
libnotify4 \
libnss3 \
libudev-dev \
libusb-1.0-0 \
libusb-1.0.0-dev \
libxss1 \
libxtst6 \
libxcursor1 \
python \
udev
python

COPY . /opt/oak

RUN npm install --engine-strict=true --progress=false --loglevel="error" \
&& npm test \
RUN npm install --engine-strict=true \
&& npm link \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.electron

ENTRYPOINT ["oak"]
CMD ["--help"]

ENV npm_config_target=%%ELECTRON_VERSION%% \
npm_config_runtime=electron \
Expand All @@ -48,7 +42,6 @@ ENV npm_config_target=%%ELECTRON_VERSION%% \
NODE_ENV=production \
ELECTRON_VERSION=%%ELECTRON_VERSION%% \
DISPLAY=:0 \
DEBUG=false \
IGNORE_GPU_BLACKLIST=false \
NODE_TLS_REJECT_UNAUTHORIZED=0 \
# nvidia card specific env vars
Expand Down
2 changes: 1 addition & 1 deletion docker-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

OAK_VERSION="5.0.0"
OAK_VERSION="5.0.1"
BASE="oaklabs/oak"

# our FROM line in the Dockerfile, should ideally match the current electron node version
Expand Down
1 change: 0 additions & 1 deletion examples/multiple-windows/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ oak.on('ready', () => {
})

function switchWindowFocus (toFocus) {
oak.log.info(`switching focus to ${toFocus.id}`)
toFocus.focus().send('isFocused')
}
})
5 changes: 0 additions & 5 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const { app, dialog, crashReporter } = require('electron')
const { join } = require('path')
const { EventEmitter2 } = require('eventemitter2')
const _ = require('lodash')
const tools = require('oak-tools')
const minimatch = require('minimatch')
const { parse } = require('url')

Expand All @@ -19,10 +18,6 @@ class Core extends EventEmitter2 {
let _this = this
this.ready = false
this.version = require(join(__dirname, '..', 'package.json')).version
this.log = tools.logger({
level: isProd ? 'error' : 'info',
pretty: !isProd
})

this.crashReporter = crashReporter

Expand Down
Loading

0 comments on commit 03277c0

Please sign in to comment.