Restore & pimp docker docs in README, now that Docker build has been fixed by Jia (thanks Jia) (fix #848)

This commit is contained in:
Ronan Jouchet 2020-08-10 21:33:32 -04:00
parent d16da7dd1f
commit fd88d5199f
2 changed files with 21 additions and 19 deletions

View File

@ -1,19 +1,3 @@
# This Dockerfile is designed to be used like the "normal" app.
# By default, the command `nativefier --help` will be executed.
# Before you can use the image, you have to build it:
#
# docker build -t local/nativefier .
#
# 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 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/
FROM node:12-stretch
LABEL description="Debian image to build nativefier apps"

View File

@ -40,9 +40,7 @@ through the numerous open tabs when I was using [Facebook Messenger](https://mes
- [Wine](https://www.winehq.org/) to package Windows apps under non-Windows platforms.
Make sure `wine` is in your system `$PATH`.
```bash
npm install -g nativefier
```
Then, install Nativefier globally with `npm install -g nativefier`
## Usage
@ -59,6 +57,26 @@ to learn about other command-line flags usable to configure the packaged app.
To have high-resolution icons used by default for an app/domain, please
contribute to the [icon repository](https://github.com/jiahaog/nativefier-icons)!
## Usage with Docker
Nativefier is also usable from Docker.
- Pull the latest stable image from Docker Hub: `docker pull jiahaog/nativefier`
- ... or build the image yourself: `docker build -t local/nativefier .`
(in this case, replace `jiahaog/` in the below examples with `local/`)
By default, the command `nativefier --help` will be executed.
To build e.g. a Gmail nativefier app to a writable local `~/nativefier-apps`,
```bash
docker run -v ~/nativefier-apps:/target/ jiahaog/nativefier https://mail.google.com/ /target/
```
You can pass Nativefier flags, and mount volumes to provide local files. For example, to use an icon,
```bash
docker run -v ~/my-icons-folder/:/src -v $TARGET-PATH:/target jiahaog/nativefier --icon /src/icon.png --name whatsApp -p linux -a x64 https://web.whatsapp.com/ /target/
```
## Development
Help welcome on [bugs](https://github.com/jiahaog/nativefier/issues?q=is%3Aopen+is%3Aissue+label%3Abug) and