Skip to content

Commit

Permalink
Update Dockerfile to node8-alpine, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ronjouch committed Nov 16, 2017
1 parent 6fb3b92 commit 6ac4f33
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
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 \
imagemagick \
### make symbolic link to use `wine`
&& ln -s /usr/bin/wine64 /usr/bin/wine

# Add sources
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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down

0 comments on commit 6ac4f33

Please sign in to comment.