-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 677 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
# Use the official Golang image as the base image
FROM golang:latest AS builder
# Set the working directory inside the container
WORKDIR /app
# Download the Paste dependencies
COPY go.mod go.sum ./
RUN go mod download
# Prefetch the binaries, so that they will be cached and not downloaded on each change
RUN go run github.com/steebchen/prisma-client-go prefetch
# Copy the source code to the container
COPY . .
# Generate the Prisma Client Go client
RUN go run github.com/steebchen/prisma-client-go generate
# Build the Go application
RUN make
# Expose the port that the application listens on
EXPOSE 8080
ENV PORT=8080
# Run the Paste application
CMD ["./bin/paste"]