Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #50 from graphops/petko/slim-down-dockerfile
Browse files Browse the repository at this point in the history
chore: slim down Dockerfile
  • Loading branch information
pete-eiger authored Mar 13, 2023
2 parents d0e7839 + d722d81 commit 2ae985d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "poi-radio"
version = "0.0.8"
version = "0.0.9"
edition = "2021"
authors = ["GraphOps (axiomatic-aardvark, hopeyen)"]
description="POI Radio monitors subgraph data integrity in real time using Graphcast SDK"
Expand Down
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:latest
FROM rust:1-bullseye AS build-image

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand All @@ -14,15 +14,21 @@ RUN apt-get update \

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh \
&& sh rustup-init.sh -y --default-toolchain stable --no-modify-path
ENV PATH="/root/.cargo/bin:${PATH}"

COPY . /poi-radio
WORKDIR /poi-radio

RUN sh install-golang.sh
ENV PATH=$PATH:/usr/local/go/bin

RUN cargo build
CMD ["cargo", "run"]
RUN cargo build --release

FROM debian:bullseye-slim AS runtime
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpq-dev \
pkg-config \
libssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build-image "/poi-radio/target/release/poi-radio" "/usr/bin/local/poi-radio"
ENTRYPOINT [ "/usr/bin/local/poi-radio" ]
6 changes: 0 additions & 6 deletions docker-compose.yml

This file was deleted.

0 comments on commit 2ae985d

Please sign in to comment.