mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
* chore(deps): bump to go1.24.0 * use proxy-wasm/proxy-wasm-go-sdk * remove tinygo * update docker image * add missing env * use go tool directive for mockgen * chore: bump Kong/ngx_wasm_module to pre-release 0.6.0 Thanks to https://github.com/Kong/ngx_wasm_module/issues/682 * fix go mod * set caddy to go1.23
30 lines
884 B
Docker
30 lines
884 B
Docker
FROM golang:1.24 AS build
|
|
|
|
RUN mkdir -p /etc/sablier/themes
|
|
WORKDIR /src
|
|
RUN go env -w GOMODCACHE=/root/.cache/go-build
|
|
|
|
# See https://docs.docker.com/build/guide/mounts/#add-bind-mounts for cached builds
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
--mount=type=bind,source=go.sum,target=go.sum \
|
|
--mount=type=bind,source=go.mod,target=go.mod \
|
|
go mod download
|
|
|
|
COPY . /src
|
|
ARG BUILDTIME
|
|
ARG VERSION
|
|
ARG REVISION
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
make BUILDTIME=${BUILDTIME} VERSION=${VERSION} GIT_REVISION=${REVISION} ${TARGETOS}/${TARGETARCH}
|
|
|
|
FROM scratch
|
|
|
|
EXPOSE 10000
|
|
COPY --from=build /etc/sablier/themes /etc/sablier/themes
|
|
COPY --from=build /src/sablier* /bin/sablier
|
|
COPY docker/sablier.yaml /etc/sablier/sablier.yaml
|
|
|
|
ENTRYPOINT [ "sablier" ]
|
|
CMD [ "--configFile=/etc/sablier/sablier.yaml", "start" ] |