Skip to content

Commit

Permalink
soda_clix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Feb 10, 2024
1 parent 662e12f commit b9dde91
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
18 changes: 18 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.design
.github
.idea
.images
.logo
.soda_resource_tools_server
.soda_resource_tools_webui
soda_cli/target
soda_cli/cache
soda_resource_tools_lib/target
soda_resource_tools_lib/cache
.vscode
soda_cli_config
target
Cargo.lock
Cross.toml
soda_clix_build_release.ps1
soda_clix_build_release.sh
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 阶段1: 构建阶段
FROM rust:latest as builder
RUN apt-get update && \
apt-get install -y openssl libssl-dev pkg-config && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/soda
COPY . .
RUN cargo build --release

# 阶段2: 最终镜像
FROM ubuntu:latest
ARG DEBIAN_FRONTEND=noninteractive
COPY --from=builder /usr/src/soda/target/release/soda_clix /usr/local/bin/soda_clix
RUN chmod +rx /usr/local/bin/soda_clix && ls -l /usr/local/bin/soda_clix
# CMD [ "/usr/local/bin/soda_clix --version" ]
CMD tail -f /dev/null
12 changes: 0 additions & 12 deletions soda_cli_docker/.dockerignore

This file was deleted.

13 changes: 0 additions & 13 deletions soda_cli_docker/Dockerfile

This file was deleted.

0 comments on commit b9dde91

Please sign in to comment.