containerfiles/gtranslate/README.md

27 lines
985 B
Markdown

# Containerfile: gtranslate
[Alexey Yerin](https://git.sr.ht/~yerinalexey) is unfortunately not interested in providing [`gtranslate`](https://git.sr.ht/~yerinalexey/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
```sh
./mk-container.sh
```
## Usage
Running the server in detached mode and querying it:
```sh
>>> 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:
```sh
>>> 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.
```