Skip to content

Commit

Permalink
equinix-labs#293 ship alpine certs with docker (equinix-labs#295)
Browse files Browse the repository at this point in the history
* switch to alpine:latest base image for certificates

Solves equinix-labs#293.

* update README.md

add Docker to the quick start section, it was missing

add a section on using volume mounts to override TLS store in the
container
  • Loading branch information
tobert authored Dec 1, 2023
1 parent 5f2c343 commit 5320afc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ On most platforms the easiest way is a go get:
go install github.com/equinix-labs/otel-cli@latest
```

Docker images are published for each otel-cli release as well:

```shell
docker pull ghcr.io/equinix-labs/otel-cli:latest
docker run ghcr.io/equinix-labs/otel-cli:latest status
```

To use the brew tap e.g. on MacOS:

```shell
Expand Down Expand Up @@ -156,6 +163,18 @@ otel-cli span --attrs item1=value1,\"item2=value2,value3\",item3=value4
otel-cli span --attrs 'item1=value1,"item2=value2,value3",item3=value4'
```

### Docker TLS Certificates

As of release 0.4.2, otel-cli containers are built off the latest Alpine base
image which contains the base CA certificate bundles. In over to override
these for e.g. a self-signed certificate, the best bet is to volume mount your
own /etc/ssl into the container, and it should get picked up by otel-cli and Go's
TLS libraries.

```shell
docker run -v /etc/ssl:/etc/ssl ghcr.io/equinix-labs/otel-cli:latest status
```

## Easy local dev

We want working on otel-cli to be easy, so we've provided a few different ways to get
Expand Down
9 changes: 6 additions & 3 deletions release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# While the top-level Dockerfile is set up for local development on otel-cli,
# this Dockerfile is only for release. otel-cli containers should contain only
# the otel-cli static binary and nothing else.
FROM scratch
# this Dockerfile is only for release.
#
# We use the Alpine base image to get the TLS trust store and not much else.
# The ca-certificates-bundle packet is pre-installed in the base so no
# additional packages are required.
FROM alpine:latest
ENTRYPOINT ["/otel-cli"]
COPY otel-cli /

0 comments on commit 5320afc

Please sign in to comment.