containerfiles/gtranslate/README.md
2022-12-19 15:44:03 +01:00

985 B

Containerfile: gtranslate

Alexey Yerin is unfortunately not interested in providing gtranslate in a container format, so here's a Containerfile for anyone in need. It is a multi-stage build which means that the Golang build environment container isn't a part of the final container. The final container is therefore just a little over 20MB. Thank you Alexey for this neat little tool!

Building

./mk-container.sh

Usage

Running the server in detached mode and querying it:

>>> docker run -it --rm --publish 5000:5000/tcp --name my-gtranslate-instance git.jilits.se/jilits/gtranslate:latest
>>> curl 'http://localhost:5000/api?from=en&to=pl&text=Translate+it'
Przetłumacz to

Run a single query:

>>> docker run -a STDOUT --rm --name dmenugtranslate git.jilits.se/jilits/gtranslate:latest gtranslate-query en pl "Hello, this is Mr. Banana."
Witam, tu Pan Banan.