2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-22 18:18:55 +00:00

Update Dockerfile to node8-alpine, fix typos

This commit is contained in:
Ronan Jouchet 2017-11-16 14:07:24 -05:00
parent 6fb3b92eb8
commit 6ac4f33661
2 changed files with 14 additions and 14 deletions

View File

@ -1,7 +1,7 @@
FROM node:7-alpine
FROM node:8-alpine
LABEL description="Alpine image to build nativfier apps"
### Install wine depedency
### Dependencies
RUN apk add --no-cache \
wine \
freetype \
@ -15,19 +15,19 @@ COPY . /nativefier
### Build app package for nativefier installation
RUN cd /nativefier/app && npm install \
# Build and install nativefier binary
&& cd /nativefier && npm install && npm run build && npm install -g \
## Remove no longer needed sources
&& rm -rf /nativefier
&& cd /nativefier && npm install && npm run build \
# Expose globally
&& npm link
### Use 1000 as default user not root
USER 1000
### Check that installation was sucessfull and chache all electron installation.
### Ensures that no addtional download will needed at runtime exectuion `docker run`.
### Check that installation was sucessful and cache electron installations.
### Ensures that no addtional download will be needed at `docker run` runtime.
RUN nativefier https://github.com/jiahaog/nativefier /tmp/nativefier \
&& nativefier -p osx https://github.com/jiahaog/nativefier /tmp/nativefier \
# TODO: windows are currently not possible, because of non 64-bit `node-rcedit`, see https://github.com/electron/node-rcedit/issues/22.
# TODO: windows are currently not possible, because of non 64-bit `node-rcedit`,
# see https://github.com/electron/node-rcedit/issues/22.
# && nativefier -p windows https://github.com/jiahaog/nativefier /tmp/nativefier \
#remove not need test aplication
&& rm -rf /tmp/nativefier

View File

@ -121,15 +121,15 @@ See [Development](docs/development.md).
## Docker Image
The [Dockerfile](Dockerfile) is designed that you can use it like the "normal" nativefier app. By default the command `nativefier --version` will be executed. Before you can use the Image you have to build it like follow:
The [Dockerfile](Dockerfile) is designed to be used like the "normal" nativefier app. By default, the command `nativefier --help` will be executed. Before you can use the image you have to build it like follow:
docker build -t local/nativefier .
After that you can build your first nativefier app to the local `$TARGET-PATH`. Please ensure that you have write access to the `$TARGET-PATH`:
After that, you can build your first nativefier app to the local `$TARGET-PATH`. Ensure you have write access to the `$TARGET-PATH`:
docker run -v $TARGET-PATH:/target local/nativefier https://my-web-app.com/ /target/
You can also use additional source or nativefier options like e.g. use a icon:
You can also pass nativefier flags, and mount additional volumes to provide local files. For example, to use a icon:
docker run -v $PATH_TO_ICON/:/src -v $TARGET-PATH:/target local/nativefier --icon /src/icon.png --name whatsApp -p linux -a x64 https://my-web-app.com/ /target/