···11+# Run this dockerfile from the top level of the indigo git repository like:
22+#
33+# podman build -f ./cmd/bigsky/Dockerfile -t bigsky .
44+55+### Compile stage
66+77+# trouble with 'No such file or directory' when building using 'golang:1.19'
88+# images, I think because of library errors when copied to 'alpine' image below
99+# https://megamorf.gitlab.io/2019/09/08/alpine-go-builds-with-cgo-enabled/
1010+# TODO: lock to a specific version of go toolchain
1111+FROM alpine:3.17 AS build-env
1212+RUN apk add --no-cache build-base make go
1313+1414+ADD . /dockerbuild
1515+WORKDIR /dockerbuild
1616+1717+RUN go build -o /bigsky ./cmd/bigsky
1818+1919+### Run stage
2020+FROM alpine:3.17
2121+2222+RUN apk add --no-cache --update dumb-init
2323+ENTRYPOINT ["dumb-init", "--"]
2424+2525+WORKDIR /
2626+RUN mkdir -p data/bigsky
2727+COPY --from=build-env /bigsky /
2828+2929+EXPOSE 2470
3030+3131+CMD ["/bigsky"]