From 0a7221343293e0d84223b69eaef8e187f225ee86 Mon Sep 17 00:00:00 2001 From: Ganesha Upadhyaya Date: Wed, 5 Jun 2024 22:36:37 -0500 Subject: [PATCH] dockerize local-da --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9cb1962 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS build-env + +# Set working directory for the build +WORKDIR /src + +COPY . . + +RUN go mod tidy -compat=1.19 && \ + go build /src/cmd/local-da/main.go + +# Final image +FROM alpine:3.18.3 + +WORKDIR /root + +# Copy over binaries from the build-env +COPY --from=build-env /src/main /usr/bin/local-da + +EXPOSE 7980 + +CMD ["local-da", "-listen-all"]