Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker file #2

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test
.PHONY: clean build install dep test lint format tools-golangci-lint tools-promtool tools help

PATHINSTBIN = $(abspath ./bin)
export PATH := $(PATHINSTBIN):$(PATH)
Expand Down
9 changes: 9 additions & 0 deletions docker/docker-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# placeholder config
http:
enabled: true

metrics:
prometheus: {}

logger:
format: json
24 changes: 24 additions & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM golang:1.23 AS build

RUN useradd -u 10001 dimo

WORKDIR /build
COPY . ./

RUN make dep
RUN make build

# FROM gcr.io/distroless/static AS final
# TODO (Kevin): repalce with distroless/static later
# reuse golang for debugging purposes
FROM golang:1.23 AS final

LABEL maintainer="DIMO <hello@dimo.zone>"

USER nonroot:nonroot

COPY --from=build --chown=nonroot:nonroot /build/bin/dps /
COPY --from=build --chown=nonroot:nonroot /build/docker/docker-config.yaml /benthos.yaml

ENTRYPOINT ["/dps"]
CMD ["-c", "/benthos.yaml"]
Loading