Skip to content

Commit

Permalink
add custom dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
carlomazzaferro committed Aug 2, 2024
1 parent 21ed92c commit f803abb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.keymanager
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
Expand Down
37 changes: 37 additions & 0 deletions Dockerfile.keymanager
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM --platform=linux/amd64 ubuntu:22.04 as build-image

WORKDIR /src
RUN apt-get update && apt-get install -y \
curl \
build-essential \
libssl-dev \
texinfo \
libcap2-bin \
pkg-config \
git \
devscripts \
debhelper \
ca-certificates \
wget

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH "/root/.cargo/bin:${PATH}"
ENV RUSTUP_HOME "/root/.rustup"
ENV CARGO_HOME "/root/.cargo"
RUN rustup toolchain install nightly-2024-07-10
RUN rustup default nightly-2024-07-10
RUN rustup component add cargo
RUN cargo install cargo-build-deps \
&& cargo install cargo-edit

FROM --platform=linux/amd64 build-image as build-app
WORKDIR /src/gpu-iris-mpc
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-gnu --bin key-manager

FROM --platform=linux/amd64 ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=build-app /src/gpu-iris-mpc/target/x86_64-unknown-linux-gnu/release/key-manager /bin/key-manager

USER 65534
ENTRYPOINT ["tail", "-f", "/dev/null"]

0 comments on commit f803abb

Please sign in to comment.