Skip to content

Commit b3ea248

Browse files
committed
Docker install
1 parent db1f8fc commit b3ea248

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,37 @@ scoop install sq
5959
go install github.com/neilotoole/sq
6060
```
6161

62+
### Docker
63+
64+
The [`ghcr.io/neilotoole/sq`](https://github.com/neilotoole/sq/pkgs/container/sq)
65+
image is preloaded with `sq` and a handful of related tools like `jq`.
66+
67+
#### Local
68+
69+
```shell
70+
# Shell into a one-time container.
71+
$ docker run -it ghcr.io/neilotoole/sq zsh
72+
73+
# Start detached (background) container named "sq-shell".
74+
$ docker run -d --name sq-shell ghcr.io/neilotoole/sq
75+
# Shell into that container.
76+
$ docker exec -it sq-shell zsh
77+
```
78+
79+
#### Kubernetes
80+
81+
Running `sq` in a Kubernetes environment is useful for DB migrations,
82+
as well as general data wrangling.
83+
84+
```shell
85+
# Start pod named "sq-shell".
86+
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
87+
# Shell into the pod.
88+
$ kubectl exec -it sq-shell -- zsh
89+
```
90+
91+
92+
6293
See other [install options](https://sq.io/docs/install/).
6394

6495
## Overview

packages/docker/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ includes a bunch of additional tools.
1111
# Shell into a one-time container.
1212
$ docker run -it ghcr.io/neilotoole/sq zsh
1313

14-
# Start container named "sq-shell" as a daemon.
14+
# Start container named "sq-shell" detached (in the background).
1515
$ docker run -d --name sq-shell ghcr.io/neilotoole/sq
1616
# Shell into that container.
1717
$ docker exec -it sq-shell zsh
@@ -23,5 +23,5 @@ $ docker exec -it sq-shell zsh
2323
# Start pod named "sq-shell".
2424
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
2525
# Shell into the pod.
26-
$ k exec -it sq-shell -- zsh
26+
$ kubectl exec -it sq-shell -- zsh
2727
```

packages/docker/alpine.Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
FROM alpine:3.19
22

3+
LABEL org.opencontainers.image.source='https://github.com/neilotoole/sq'
4+
LABEL org.opencontainers.image.description='sq data wrangler, on Alpine Linux'
5+
LABEL org.opencontainers.image.licenses=MIT
6+
37
WORKDIR /root
48

59
RUN apk add --update --no-cache curl gnupg wget bash bash-completion zsh \

0 commit comments

Comments
 (0)