From fd88d5199f4010e31985b20cd40713f3d8766aaf Mon Sep 17 00:00:00 2001 From: Ronan Jouchet Date: Mon, 10 Aug 2020 21:33:32 -0400 Subject: [PATCH] Restore & pimp docker docs in README, now that Docker build has been fixed by Jia (thanks Jia) (fix #848) --- Dockerfile | 16 ---------------- README.md | 24 +++++++++++++++++++++--- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8eccd0a..3f92add 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" diff --git a/README.md b/README.md index 1511508..9978f35 100644 --- a/README.md +++ b/README.md @@ -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