1
0
Fork 0
mirror of https://github.com/on4kjm/FLEcli.git synced 2025-02-19 21:20:12 +01:00
FLEcli/docker/README.md

24 lines
1.3 KiB
Markdown
Raw Normal View History

## goReleaser built Docker images
* `goreleaser --snapshot --skip-publish --rm-dist`
2020-07-27 22:26:43 +02:00
* docker image is named "on4kjm/flecli". It creates two labels automatically ("latest" and the last release)
## Building the image by hand
(this assumes that the Linux executable is available in `dist/`, thus as built by GoReleaser)
* `docker build -f docker/Dockerfile -t test/test dist/FLEcli_linux_amd64` will create a image called `test/test:latest`.
## Running the container
2020-07-27 22:26:43 +02:00
To start and execute the `<FLEcli command>` use : `docker run --rm -i --user $(id -u):$(id -g) -v $(pwd):/FLEcli_data on4kjm/flecli <FLEcli command>`. If no command is specified, help is displayed.
2020-07-27 22:26:43 +02:00
This little command will create an alias that avoids typing the whole command: `alias FLEcli="docker run --rm --user $(id -u):$(id -g) -v $(pwd):/FLEcli_data on4kjm/flecli"`. To use it, type `FLEcli version` for example.
Important note: when specifying the path of a file (input or output), it must be relative to the directory the container was started in.
## Running bash in the container
2020-07-27 22:26:43 +02:00
Note, this doesn't work with the SCRATCH image. You need to use the Alpine base image. Anyway, if you want to enter the container, you know what I am talking about.
* `docker run --rm -i -v "$(pwd)":/FLEcli_data --entrypoint /bin/sh on4kjm/flecli`