use existin dockerfile

This commit is contained in:
Dean Chi
2023-08-31 20:34:21 -07:00
parent ae5f513942
commit 7ec6b5c69c
3 changed files with 1 additions and 17 deletions

View File

@@ -72,5 +72,6 @@ jobs:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./dockerfiles/components/ordhook.dockerfile
# Only push if (there's a new release on main branch, or if building a non-main branch) and (Only run on non-PR events or only PRs that aren't from forks)
push: ${{ (github.ref != 'refs/heads/master' || steps.semantic.outputs.new_release_version != '') && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}

View File

@@ -1,17 +0,0 @@
FROM rust:bullseye as build
WORKDIR /src
RUN apt update && apt install -y ca-certificates pkg-config libssl-dev libclang-11-dev
RUN rustup update 1.67.0 && rustup default 1.67.0
COPY ./components /src/components
WORKDIR /src/components/ordhook-cli
RUN mkdir /out
RUN cargo build --features release --release
RUN cp target/release/ordhook /out
FROM rust:slim-bullseye
RUN apt update && apt install -y ca-certificates libssl-dev
COPY --from=build /out/ /bin/
WORKDIR /workspace
ENTRYPOINT ["ordhook"]