-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.Dockerfile
More file actions
50 lines (34 loc) · 1.35 KB
/
debug.Dockerfile
File metadata and controls
50 lines (34 loc) · 1.35 KB
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
40
41
42
43
44
45
46
47
48
49
50
# SPDX-FileCopyrightText: 2025 INDUSTRIA DE DISEÑO TEXTIL, S.A. (INDITEX, S.A.)
#
# SPDX-License-Identifier: Apache-2.0
### Build stage
# Define the desired Golang version
ARG GOLANG_VERSION=1.25.7
# Use an official Golang image with a specific version based on Debian
FROM golang:${GOLANG_VERSION}-trixie AS builder
# Create a working directory for the redis client
WORKDIR /redis-client
# Install git to be able to clone the repository
RUN apt update && apt upgrade -y && apt install -y git
# Define the desired Redis client version
ARG REDIS_CLIENT_VERSION=8.2.3
# Clone the Redis repository, checkout the desired version and build redis-cli
RUN git clone https://github.com/redis/redis.git && \
cd redis && \
git checkout ${REDIS_CLIENT_VERSION} && \
make redis-cli
## Final stage
# Define the desired Golang version
ARG GOLANG_VERSION
# Use an official Golang image with a specific version based on Debian
FROM golang:${GOLANG_VERSION}-trixie
# Define the desired Delve version
ARG DELVE_VERSION=1.25
# Install Delve debugger
RUN go install "github.com/go-delve/delve/cmd/dlv@v${DELVE_VERSION}"
# Install some useful tools
RUN apt update && apt upgrade -y && apt install -y curl procps
# Copy the redis-cli binary from the redis-client stage
COPY --from=builder /redis-client/redis/src/redis-cli /usr/local/bin/redis-cli
WORKDIR /
EXPOSE 40000