Files
chronical/Dockerfile
William Gill d866b595d6
All checks were successful
Create Release & Upload Assets / Upload Assets To Gitea w/ goreleaser (push) Successful in 2m59s
Create Release & Upload Assets / Build Container Image (push) Successful in 58s
oops
2025-10-11 03:57:53 +00:00

36 lines
1018 B
Docker

# -------------------------------------------------------------------- #
# GoServ Dockerfile #
# Environment: Alpine #
# Applications: Go #
# -------------------------------------------------------------------- #
# Build Environment
# Start from the latest golang base image
FROM golang:alpine AS build
ARG TOKEN
ARG VERSION
# Set the Current Working Directory inside the container
WORKDIR /build
RUN apk add curl tar
RUN curl -vLJ -H "Authorization: token ${TOKEN}" -o chronical_linux_amd64.tar https://git.anomalous.dev/57_Wolve/chronical/releases/download/${VERSION}/chronical_linux_amd64.tar
RUN tar xvf chronical_linux_amd64.tar -C /build
# Release Environment
FROM golang:alpine AS runtime
WORKDIR /app
COPY --from=build /build/chronical /app/
# Expose port 8080 to the outside world
EXPOSE 8080
# Command to run the executable
CMD ["./chronical"]