-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
56 lines (49 loc) · 1.65 KB
/
Dockerfile.dev
File metadata and controls
56 lines (49 loc) · 1.65 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
51
52
53
54
55
56
FROM silkeh/clang:18
# Install additional development tools that aren't in the base image
RUN apt-get update && apt-get install -y \
# Core development tools
cmake \
ninja-build \
git \
curl \
wget \
unzip \
# Shell tools
shellcheck \
# Additional utilities
tree \
htop \
jq \
# Cleanup
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install gitleaks (secret scanner)
RUN GITLEAKS_VERSION="8.18.2" \
&& ARCH=$(dpkg --print-architecture) \
&& if [ "$ARCH" = "amd64" ]; then GITLEAKS_ARCH="x64"; \
elif [ "$ARCH" = "arm64" ]; then GITLEAKS_ARCH="arm64"; \
else echo "Unsupported architecture: $ARCH" && exit 1; fi \
&& curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_${GITLEAKS_ARCH}.tar.gz" \
| tar -xzC /usr/local/bin gitleaks \
&& chmod +x /usr/local/bin/gitleaks
# Set up git configuration for containers
RUN git config --system init.defaultBranch main \
&& git config --system pull.rebase false \
&& git config --system core.autocrlf false
# Create workspace directory
WORKDIR /workspace
# Set environment variables
ENV CC=clang \
CXX=clang++ \
ASAN_OPTIONS="abort_on_error=1:halt_on_error=1:print_stats=1" \
UBSAN_OPTIONS="abort_on_error=1:halt_on_error=1:print_stacktrace=1"
# Verify tools are installed correctly
RUN echo "Verifying installed tools..." \
&& cmake --version \
&& clang --version \
&& git --version \
&& gitleaks version \
&& shellcheck --version \
&& echo "✅ All development tools verified successfully"
# Default command
CMD ["/bin/bash"]