forked from cerc-io/laconicd-deprecated
32 lines
618 B
Docker
32 lines
618 B
Docker
FROM golang:alpine AS build-env
|
|
|
|
# Set up dependencies
|
|
ENV PACKAGES git build-base
|
|
|
|
# Set working directory for the build
|
|
WORKDIR /go/src/github.com/cerc-io/laconicd
|
|
|
|
# Install dependencies
|
|
RUN apk add --no-cache $PACKAGES
|
|
|
|
RUN apk add --no-cache linux-headers
|
|
|
|
# Add source files
|
|
COPY . .
|
|
|
|
# Make the binary
|
|
RUN make build
|
|
|
|
# Final image
|
|
FROM alpine:3.17.1
|
|
|
|
# Install ca-certificates
|
|
RUN apk add --no-cache ca-certificates jq curl
|
|
WORKDIR /
|
|
|
|
# Copy over binaries from the build-env
|
|
COPY --from=build-env /go/src/github.com/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
|
|
|
|
# Run laconicd by default
|
|
CMD ["laconicd"]
|