forked from RediSearch/RediSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 1015 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 1015 Bytes
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
# ---------------------------------------------------------
# Build argument to select the base image dynamically.
# Examples:
# docker build --build-arg BASE_IMAGE=ubuntu:24.04 .
# docker build --build-arg BASE_IMAGE=rockylinux:9 .
# docker build --build-arg BASE_IMAGE=alpine:3 .
# ---------------------------------------------------------
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ENV GITHUB_ACTIONS=true
WORKDIR /project
# Ensure bash is present. Not all images come with it.
RUN if ! command -v bash >/dev/null 2>&1; then \
(apt-get update && apt-get install -y --no-install-recommends bash) || \
(yum install -y bash) || \
(apk add --no-cache bash); \
fi
COPY . .
WORKDIR /project/.install
RUN bash retry.sh bash -l -eo pipefail install_script.sh
WORKDIR /project
RUN bash .install/retry.sh bash -l -eo pipefail .install/test_deps/install_rust_deps.sh
# Expose newly-installed Rust and Python tools via PATH
ENV PATH="/root/.cargo/bin:/root/.local/bin:${PATH}"
WORKDIR /project