Skip to content

Commit

Permalink
modified Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
FavourDaniel committed Sep 25, 2024
1 parent d9707ae commit bcf0dc6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions cmd/signozcollector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# use a minimal alpine image
FROM alpine:3

ARG ALPINE_SHA="pass-a-valid-docker-sha-otherwise-this-will-fail"

FROM alpine:3@sha256:${ALPINE_SHA}

# add ca-certificates in case you need them
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*

# define arguments and default values
ARG TARGETOS TARGETARCH
ARG USER_UID=10001
ARG OS="linux"
ARG ARCH

# create a non-root user for running the collector
USER ${USER_UID}

# copy the binaries from the multi-stage build
COPY .build/${TARGETOS}-${TARGETARCH}/signoz-collector /signoz-collector
COPY ./target/${OS}-${ARCH}/signoz-collector /signoz-collector

# copy the config file
COPY config/default-config.yaml /etc/otel/config.yaml
Expand Down
10 changes: 7 additions & 3 deletions cmd/signozschemamigrator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# use a minimal alpine image
FROM alpine:3.17

ARG ALPINE_SHA="pass-a-valid-docker-sha-otherwise-this-will-fail"

FROM alpine:3.17@sha256:${ALPINE_SHA}

# define arguments and default values
ARG TARGETOS TARGETARCH
ARG USER_UID=10001
ARG OS="linux"
ARG ARCH

# create a non-root user for running the migrator
USER ${USER_UID}

# copy the binaries from the multi-stage build
COPY .build/${TARGETOS}-${TARGETARCH}/signoz-schema-migrator /signoz-schema-migrator
COPY ./target/${OS}-${ARCH}/signoz-schema-migrator /signoz-schema-migrator
COPY migrationmanager ./migrationmanager

# run the binary as the entrypoint and pass the default dsn as a flag
Expand Down

0 comments on commit bcf0dc6

Please sign in to comment.