mirror of https://github.com/on4kjm/FLEcli.git
parent
33dbfde31a
commit
8afb81eed3
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
CURRENT_UID = $(id -u):$(id -g)
|
||||
docker run --rm -ti --user $(CURRENT_UID) -v $(pwd):/FLEcli_data jmmeessen/flecli "$@"
|
@ -0,0 +1 @@
|
||||
*.md
|
@ -0,0 +1,16 @@
|
||||
FROM alpine:3.12 AS builder
|
||||
|
||||
# Copy the executable
|
||||
COPY FLEcli /FLEcli_bin/FLEcli
|
||||
RUN chmod +x /FLEcli_bin/FLEcli
|
||||
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /FLEcli_bin/FLEcli /FLEcli_bin/FLEcli
|
||||
|
||||
# Create the data directory and set it as the defautl directory
|
||||
WORKDIR /FLEcli_data
|
||||
|
||||
ENTRYPOINT ["/FLEcli_bin/FLEcli"]
|
||||
CMD ["help"]
|
@ -0,0 +1,21 @@
|
||||
## Building docker image by hand
|
||||
|
||||
* `docker build -t fle_cli .`
|
||||
|
||||
## goReleaser built Docker images
|
||||
|
||||
* `goreleaser --snapshot --skip-publish --rm-dist`
|
||||
* docker image is named "jmmeessen/flecli". It creates two labels automatically ("latest" and the last release)
|
||||
|
||||
## Running the container
|
||||
|
||||
* `docker run --rm -i fle_cli version -d`
|
||||
* `docker run --rm -i -v "$(pwd)":/FLEcli_data fle_cli version -d`
|
||||
* `docker run --rm -i jmmeessen/flecli version -d`
|
||||
|
||||
* `docker run --rm -i --user $(id -u):$(id -g) -v $(pwd):/FLEcli_data jmmeessen/flecli`.
|
||||
* `alias FLEcli="docker run --rm --user $(id -u):$(id -g) -v $(pwd):/FLEcli_data jmmeessen/flecli"`
|
||||
|
||||
## Running bash in the container
|
||||
|
||||
* `docker run --rm -i -v "$(pwd)":/FLEcli_data --entrypoint /bin/sh fle_cli`
|
Loading…
Reference in new issue