feat(docker): adding valkey-cli to template image
All checks were successful
Build and Push Image / Build and push image (push) Successful in 2m0s
All checks were successful
Build and Push Image / Build and push image (push) Successful in 2m0s
This commit is contained in:
@ -1,19 +1,22 @@
|
|||||||
# Base image
|
# Base image
|
||||||
FROM golang AS builder
|
FROM golang:tip-alpine3.21 AS builder
|
||||||
|
|
||||||
# Set directory to known value
|
# Set directory to known value
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# Define the version as a build argument
|
# Define the version as a build argument
|
||||||
ARG GOTEMPLATE_VERSION=3.12.0
|
ARG GOTEMPLATE_VERSION=3.12.0
|
||||||
|
|
||||||
|
RUN apk add valkey-cli git
|
||||||
|
|
||||||
# Git clone the repo for gotemplate, checkout the desired tag, and build the executable
|
# Git clone the repo for gotemplate, checkout the desired tag, and build the executable
|
||||||
RUN git clone https://github.com/coveooss/gotemplate.git . && \
|
RUN git clone https://github.com/coveooss/gotemplate.git . && \
|
||||||
git checkout v${GOTEMPLATE_VERSION} && \
|
git checkout v${GOTEMPLATE_VERSION} && \
|
||||||
CGO_ENABLED=0 go build
|
CGO_ENABLED=0 go build
|
||||||
|
|
||||||
FROM busybox
|
|
||||||
|
|
||||||
|
FROM alpine:3.21
|
||||||
|
#
|
||||||
COPY --from=builder /app/gotemplate /gotemplate
|
COPY --from=builder /app/gotemplate /gotemplate
|
||||||
COPY --from=builder /bin/cp /cp
|
COPY --from=builder /usr/bin/valkey-cli /valkey-cli
|
||||||
|
|
||||||
ENTRYPOINT [ "/gotemplate" ]
|
ENTRYPOINT [ "/gotemplate" ]
|
Reference in New Issue
Block a user