Skip to contents

Writes a Dockerfile that installs the package with dockerfiler::dock_from_desc(), then serves it over HTTP with its worker pool, as a non-root user, on 0.0.0.0, probed on /health. Give it a token, docker run -e MORDEW_TOKEN=... -p 8080:8080 <image>, unless a proxy in front authenticates the clients: without one, it warns at start-up. The .dockerignore keeps .Renviron and .env out of the image.

Usage

add_dockerfile(mordew_wd = get_mordew_wd(), port = 8080, ...)

Arguments

mordew_wd

Path to the package, get_mordew_wd() by default.

port

Port the server listens on in the container.

...

Passed to dockerfiler::dock_from_desc().

Value

Nothing: called to write the Dockerfile.

Examples

if (FALSE) { # \dontrun{
# In the folder of a package made by create_mordew(), with dockerfiler:
add_dockerfile()
} # }