-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathDockerfile
More file actions
94 lines (72 loc) · 2.87 KB
/
Dockerfile
File metadata and controls
94 lines (72 loc) · 2.87 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
FROM ubuntu:24.04 AS base
## Add non-root user for startup of postgres with rust backend
ARG USERNAME=user
# Rename the default user (uid 1000) from `ubuntu` to USERNAME
RUN usermod -l $USERNAME -d /home/$USERNAME -m ubuntu
ENV HOME /home/$USERNAME
RUN echo "$USERNAME:pass" | chpasswd
# Set locale to fix postgres embedded startup
ENV LC_ALL=en_US.UTF-8
## Install common dependencies
RUN apt-get update --fix-missing && \
apt-get install -y \
curl \
unzip \
git \
gnupg2 \
sudo \
build-essential \
# Go is required to build aws-lc-fips-sys when rustls is built with FIPS
golang-go \
openssl \
cmake \
pkg-config \
libssl-dev \
libsasl2-dev \
ca-certificates \
gnupg \
protobuf-compiler \
git \
jq
## Setup Java and Python
RUN apt-get install -y \
gcc clang libclang-dev python3-pip python3-plumbum \
hub numactl openjdk-21-jre-headless maven
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
## Install nodejs
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
ENV NODE_MAJOR=20
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
RUN apt update --fix-missing && apt install -y nodejs
## Install Redpanda rpk to enable preparing demos
RUN ARCH=`dpkg --print-architecture`; \
curl -LO --output-dir $HOME https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-linux-$ARCH.zip \
&& unzip $HOME/rpk-linux-$ARCH.zip -d /bin/ \
&& rpk version \
&& rm $HOME/rpk-linux-$ARCH.zip
## Install python dependencies for the demos
RUN pip3 install --break-system-packages gdown kafka-python-ng
## Prepare directories for non-root user (for Claude Code)
RUN mkdir -p /home/$USERNAME/.local/share/claude && chown -R $USERNAME /home/$USERNAME/.local/share/claude
RUN mkdir -p /home/$USERNAME/.local/state/claude && chown -R $USERNAME /home/$USERNAME/.local/state/claude
RUN mkdir -p /home/$USERNAME/.local/bin/ && chown -R $USERNAME /home/$USERNAME/.local/bin/
## Switch to non-root user
USER $USERNAME
## Install rustup and common components
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="$HOME/.cargo/bin:$PATH"
## Install Bun.js
RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.3.3"
ENV PATH="$HOME/.bun/bin:$PATH"
RUN $HOME/.bun/bin/bun install --global @hey-api/openapi-ts
## Install Claude Code
RUN curl -fsSL https://claude.ai/install.sh | bash
RUN \
rustup install $RUST_VERSION && \
rustup component add rustfmt && \
rustup component add clippy && \
cargo install cargo-make
## Install Samply
RUN echo "pass" | sudo curl --proto '=https' --tlsv1.2 -LsSf https://github.com/feldera/samply/releases/download/v0.13.2/samply-installer.sh | sh
ENV PATH="$HOME/.local/bin:$PATH"