-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathDockerfile
39 lines (26 loc) · 989 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
34
35
36
37
38
39
FROM public.ecr.aws/r3m4q3r9/pub-mirror-go:1.21.0 as builder
ARG APP_VERSION=unknown
# Set the working directory within the container
WORKDIR /app
# Copy go.mod and go.sum files to the container's working directory
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy the source code to the container's working directory
COPY . .
# Build the Go application
RUN go build -o qovery -ldflags "-X github.com/qovery/qovery-cli/utils.Version=$APP_VERSION"
FROM public.ecr.aws/r3m4q3r9/pub-mirror-debian:bookworm-slim as runner
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists
WORKDIR /app
# make the exec.sh file executable
COPY docker/ docker
RUN chmod +x ./docker/exec.sh
COPY --from=builder /app/qovery /app/qovery
# Add the /app directory to the PATH environment variable
ENV PATH="/app:${PATH}"
ENTRYPOINT ["sh", "./docker/exec.sh"]