containerfiles/gtranslate
Emil Dabrowski a52f6367b5 Add gtranslate 2022-12-19 15:44:03 +01:00
..
source-code@4244e2734b Add gtranslate 2022-12-19 15:44:03 +01:00
Containerfile Add gtranslate 2022-12-19 15:44:03 +01:00
README.md Add gtranslate 2022-12-19 15:44:03 +01:00
mk-container.sh Add gtranslate 2022-12-19 15:44:03 +01:00

README.md

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.