22 lines
421 B
Text
22 lines
421 B
Text
|
# Use Go 1.23 bookworm as base image
|
||
|
FROM golang:1.23.4-alpine AS base
|
||
|
|
||
|
# Move to working directory /build
|
||
|
WORKDIR /build
|
||
|
|
||
|
# Copy the go.mod and go.sum files to the /build directory
|
||
|
COPY go.mod go.sum ./
|
||
|
|
||
|
# Install dependencies
|
||
|
RUN go mod download
|
||
|
|
||
|
# Copy the entire source code into the container
|
||
|
COPY . .
|
||
|
|
||
|
# Build the application
|
||
|
RUN go build -o piped-refresher
|
||
|
|
||
|
# Start the application
|
||
|
CMD ["/build/piped-refresher"]
|
||
|
|