Docker install

This commit is contained in:
neilotoole 2024-02-10 13:17:10 -07:00
parent db1f8fcbbf
commit b3ea2485d5
3 changed files with 37 additions and 2 deletions

View File

@ -59,6 +59,37 @@ scoop install sq
go install github.com/neilotoole/sq
```
### Docker
The [`ghcr.io/neilotoole/sq`](https://github.com/neilotoole/sq/pkgs/container/sq)
image is preloaded with `sq` and a handful of related tools like `jq`.
#### Local
```shell
# Shell into a one-time container.
$ docker run -it ghcr.io/neilotoole/sq zsh
# Start detached (background) container named "sq-shell".
$ docker run -d --name sq-shell ghcr.io/neilotoole/sq
# Shell into that container.
$ docker exec -it sq-shell zsh
```
#### Kubernetes
Running `sq` in a Kubernetes environment is useful for DB migrations,
as well as general data wrangling.
```shell
# Start pod named "sq-shell".
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
# Shell into the pod.
$ kubectl exec -it sq-shell -- zsh
```
See other [install options](https://sq.io/docs/install/).
## Overview

View File

@ -11,7 +11,7 @@ includes a bunch of additional tools.
# Shell into a one-time container.
$ docker run -it ghcr.io/neilotoole/sq zsh
# Start container named "sq-shell" as a daemon.
# Start container named "sq-shell" detached (in the background).
$ docker run -d --name sq-shell ghcr.io/neilotoole/sq
# Shell into that container.
$ docker exec -it sq-shell zsh
@ -23,5 +23,5 @@ $ docker exec -it sq-shell zsh
# Start pod named "sq-shell".
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
# Shell into the pod.
$ k exec -it sq-shell -- zsh
$ kubectl exec -it sq-shell -- zsh
```

View File

@ -1,5 +1,9 @@
FROM alpine:3.19
LABEL org.opencontainers.image.source='https://github.com/neilotoole/sq'
LABEL org.opencontainers.image.description='sq data wrangler, on Alpine Linux'
LABEL org.opencontainers.image.licenses=MIT
WORKDIR /root
RUN apk add --update --no-cache curl gnupg wget bash bash-completion zsh \