Skip to content

Commit a09c70f

Browse files
committed
refactor(docker): use minimal docker for image publish
1 parent 35fd1ea commit a09c70f

File tree

5 files changed

+14
-35
lines changed

5 files changed

+14
-35
lines changed

.github/workflows/rust.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Check-out code
1717
uses: actions/checkout@v2
1818
- name: Build image
19-
run: docker build -t agent .
19+
run: docker build -f integration-tests/Dockerfile -t agent .
2020
- name: Run tests
2121
run: docker run -v $PWD:/agent agent ./tests.sh

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-agent"
3-
version = "2.12.0"
3+
version = "2.12.1"
44
edition = "2021"
55

66
[[bin]]

Dockerfile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
FROM python:3.10-slim-bullseye
1+
FROM rust:slim-bookworm as builder
22

3-
# Install Rust
4-
RUN apt update && apt install -y curl pkg-config libssl-dev build-essential
5-
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
6-
ENV PATH="/root/.cargo/bin:${PATH}"
7-
RUN rustup toolchain install nightly
8-
9-
# Install poetry
10-
RUN pip install poetry
11-
ENV PATH="${PATH}:/root/.local/bin"
12-
RUN poetry config virtualenvs.in-project true
13-
14-
# Install Solana Tool Suite
15-
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.14.17/install)"
16-
ENV PATH="${PATH}:/root/.local/share/solana/install/active_release/bin"
3+
RUN apt update && apt install -y curl libssl-dev pkg-config && apt clean all
174

185
ADD . /agent
196
WORKDIR /agent
207

218
RUN cargo build --release
9+
10+
FROM debian:12-slim
11+
12+
RUN apt update && apt install -y libssl-dev && apt clean all
13+
14+
COPY --from=builder /agent/target/release/agent /agent/
15+
COPY --from=builder /agent/config/* /agent/config/
16+
17+
ENTRYPOINT ["/agent/agent"]

agent.Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)