-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
33 lines (22 loc) · 841 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Stage 1: Build the binary with OpenCL dependencies
FROM golang:1.22-bullseye as builder
ARG VERSION
# Set the working directory inside the container
WORKDIR /app
# Copy the workspace files
COPY . .
# Ensure dependencies are downloaded based on your workspace configuration
RUN go work sync
# Build the application statically
RUN CGO_ENABLED=0 go build -a -ldflags "-s -w -X main.Version=${VERSION}" -o pippin ./apps/cli
# Stage 2: Use a smaller base image
FROM debian:bullseye-slim
# Set the working directory inside the container
WORKDIR /root/
ENV PIPPIN_HOME=/root/
# Copy the Pre-built binary file from the previous stage
COPY --from=builder /app/pippin .
# Copy SSL certificates
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
# Command to run the executable
ENTRYPOINT ["./pippin", "-start-server"]