# Build container FROM golang:bookworm AS build # Setup environment RUN mkdir -p /data WORKDIR /data # Copy modules first to leverage Docker cache COPY go.mod go.sum ./ RUN go mod download # Copy the rest of the source COPY . . # Build the release RUN make build/weron # Extract the release RUN mkdir -p /out RUN cp out/weron /out/weron # Release container FROM debian:bookworm # Install certificates RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* # Add the release COPY --from=build /out/weron /usr/local/bin/weron # Ensure executable RUN chmod +x /usr/local/bin/weron # Run the binary by default CMD ["/usr/local/bin/weron"]
# Exclude VCS .git # IDE / OS local files .vscode/ .idea/ *.swp *.tmp # Node and frontend artifacts (if any) node_modules/ dist/ build/ # Go related *.test *.exe *.dll *.so *.dylib vendor/ # Misc .env .env.* *.log out/
Smoke [PASS]: test -x /usr/local/bin/weron Smoke [PASS]: /usr/local/bin/weron --help | head -n 1 Smoke [PASS]: file /usr/local/bin/weron | head -n 1