Skip to content

Commit

Permalink
feat(docker): Add BindPlane support to minimal image (#1771)
Browse files Browse the repository at this point in the history
* fix(docker): Set uid and guid for user in scratch based image

* Create store directory and set env variables
  • Loading branch information
Joseph Sirianni authored Jul 25, 2024
1 parent 34dac30 commit f26826d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docker/Dockerfile.scratch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
# Alpine is used to retrieve the CA certificates.
FROM alpine as stage

RUN addgroup -S otel && adduser -S otel -G otel
RUN addgroup -S -g 10005 otel && adduser -S -u 10005 -G otel otel

RUN apk update && apk add --no-cache ca-certificates

RUN mkdir \
/etc/otel \
/etc/otel/storage \
&& chown -R otel:otel /etc/otel \
&& chmod 0750 /etc/otel/storage

RUN mkdir /licenses
COPY LICENSE /licenses/observiq-otel-collector.license

Expand All @@ -29,9 +35,13 @@ COPY --from=stage /etc/group /etc/group
COPY --from=stage /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=stage --chown=otel:otel /licenses /licenses
COPY --from=stage --chown=otel:otel /etc/otel /etc/otel
COPY --from=stage --chown=otel:otel /etc/otel/storage /etc/otel/storage

COPY observiq-otel-collector /collector/observiq-otel-collector

ENV OIQ_OTEL_COLLECTOR_HOME=/etc/otel
ENV OIQ_OTEL_COLLECTOR_STORAGE=/etc/otel/storage

USER otel
WORKDIR /etc/otel
ENTRYPOINT ["/collector/observiq-otel-collector"]

0 comments on commit f26826d

Please sign in to comment.