Repository navigation
Expand file tree
/
Copy pathDockerfile.base
More file actions
42 lines (36 loc) · 1.66 KB
/
Copy pathDockerfile.base
File metadata and controls
42 lines (36 loc) · 1.66 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
FROM --platform=linux/amd64 \
ruby:3.4-slim-trixie@sha256:a1e521f7710a59431695c0628de8ffdbbceec17065a217bd67b59343d4d17b22
# This is the base Docker image for scip-ruby with common dependencies
# Version argument to be passed during build
ARG SCIP_RUBY_VERSION
# Fail if SCIP_RUBY_VERSION is not provided
RUN test -n "${SCIP_RUBY_VERSION}" || \
(echo "ERROR: SCIP_RUBY_VERSION build arg is required" && exit 1)
# ca-certificates is listed so the build picks up trust store fixes from
# trixie-security (e.g. 20250419+deb13u1 distrusts the compromised eMudhra chains).
# The other deps are used by the autoindex script and to build C extensions in gems.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
wget \
git \
build-essential \
automake \
autoconf && \
rm -rf /var/lib/apt/lists/*
# Use a release binary instead of building from source
# because release builds are very time-consuming.
#
# The release version is verified by tools/scripts/publish-scip-ruby.sh
# The binary at this version is guaranteed to exist because this workflow runs either:
# 1. Manually with a specific tag that already has a release
# 2. After the Release workflow completes (which creates the release and uploads the binary)
#
# `scip-ruby --version` fails the build if the binary can't run on this base
# (e.g. it needs a newer glibc).
RUN wget https://github.com/sourcegraph/scip-ruby/releases/download/scip-ruby-v${SCIP_RUBY_VERSION}/scip-ruby-x86_64-linux \
-O /usr/bin/scip-ruby && \
chmod +x /usr/bin/scip-ruby && \
scip-ruby --version
# Set working directory for sources
WORKDIR /sources