-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (39 loc) · 1.22 KB
/
Dockerfile
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
################################
# ____ _ _ ___ _ ____
# | __ )| | | |_ _| | | _ \
# | _ \| | | || || | | | | |
# | |_) | |_| || || |___| |_| |
# |____/ \___/|___|_____|____/
#
# Builder layer
FROM rust:1.69 AS build
## arm64 tweaks
# context: https://github.com/docker/buildx/issues/359#issuecomment-1331443419
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
WORKDIR sdk
COPY . .
RUN cargo build --release \
&& strip /sdk/target/release/ctoai /sdk/target/release/sdk /sdk/target/release/ux
########################
# ____ ___ ____ _____
# | _ \_ _/ ___|_ _|
# | | | | |\___ \ | |
# | |_| | | ___) || |
# |____/___|____/ |_|
#
# Binary distribution layer
FROM scratch AS dist
COPY --from=build /sdk/target/release/ctoai /sdk/target/release/sdk /sdk/target/release/ux /
#########################
# ____ _______ __
# | _ \| ____\ \ / /
# | | | | _| \ \ / /
# | |_| | |___ \ V /
# |____/|_____| \_/
#
# SDK-bash image is no longer built from this Dockerfile,
# however the following stage could be used for dev purposes
FROM debian:bullseye-slim
RUN apt-get update \
&& apt-get install -y curl
COPY --from=build /sdk/target/release/ctoai /sdk/target/release/sdk /sdk/target/release/ux /usr/local/bin/