-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (51 loc) · 2.54 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (51 loc) · 2.54 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
FROM ubuntu:24.04
# install utilities
RUN apt update -y && \
apt install -y lsof curl libssl-dev jq
# copy the api in
WORKDIR /app
ADD ./target/release/thorium-api thorium-api
ADD ./target/release/thorium-operator thorium-operator
ADD ./target/release/thoradm thoradm
ADD ./target/release/thorium-scaler thorium-scaler
ADD ./target/release/thorium-search-streamer thorium-search-streamer
ADD ./target/release/thorium-event-handler thorium-event-handler
# Add UI bundle to root path
ADD ./ui/dist ui
# copy ther user and developer docs in
ADD ./api/docs/book docs/user
ADD ./target/doc docs/dev
# copy our binaries in
ADD ./target/x86_64-unknown-linux-musl/release/thorctl binaries/linux/x86-64/thorctl
ADD ./target/x86_64-unknown-linux-musl/release/thorium-agent binaries/linux/x86-64/thorium-agent
ADD ./target/x86_64-unknown-linux-musl/release/thorium-reactor binaries/linux/x86-64/thorium-reactor
ADD ./target/x86_64-unknown-linux-musl/release/thoradm binaries/linux/x86-64/thoradm
ADD ./target/x86_64-unknown-linux-musl/release/thorium-operator binaries/linux/x86-64/thorium-operator
# copy windows binaries to target paths
ADD ./target/x86_64-pc-windows-gnu/release/thorctl.exe binaries/windows/x86-64/thorctl.exe
ADD ./target/x86_64-pc-windows-gnu/release/thorium-agent.exe binaries/windows/x86-64/thorium-agent.exe
ADD ./target/x86_64-pc-windows-gnu/release/thorium-reactor.exe binaries/windows/x86-64/thorium-reactor.exe
# copy macos binaries to target paths
ADD ./target/x86_64-apple-darwin/release/thorctl binaries/darwin/x86-64/thorctl
ADD ./target/aarch64-apple-darwin/release/thorctl binaries/darwin/arm64/thorctl
# copy the thorctl install script to the right path
ADD ./api/docs/src/scripts/install-thorctl.sh binaries/install-thorctl.sh
# make glibc compiled binaries executable
RUN chmod +x thorium-api \
thoradm \
thorium-operator \
thorium-scaler \
thorium-search-streamer \
thorium-event-handler
# make cross compiled binaries executable
RUN chmod -R +x binaries
# add banner to default path
ADD ./ui/src/assets/banner.txt banner.txt
# download crane
RUN VERSION=$(curl -s "https://api.github.com/repos/google/go-containerregistry/releases/latest" | jq -r '.tag_name') && \
export OS=Linux && \
export ARCH=x86_64 && \
curl -sL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" > go-containerregistry.tar.gz && \
tar xzvf go-containerregistry.tar.gz && \
rm gcrane krane go-containerregistry.tar.gz LICENSE README.md
ENTRYPOINT ["./thorium-operator", "operate"]