Skip to content

Commit

Permalink
dev: add dockerfile for local dev (#172)
Browse files Browse the repository at this point in the history
There have been some comments about wanting an easier developer
experience, particularly on MacOS. This adds a Dockerfile which will
create an environment in which all tests can pass and will hopefully
make cross-platform development easier.

Solves #91
  • Loading branch information
gumpt authored Mar 29, 2024
1 parent 07f6854 commit 5fdf287
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM debian:latest as builder

ARG BUILDARCH
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
gcc g++ libfindbin-libs-perl \
make cmake libclang-dev git \
wget curl gnupg ca-certificates lsb-release \
&& wget --no-check-certificate -O - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty.gpg \
&& if [ "${BUILDARCH}" = "arm64" ]; then URL="http://openresty.org/package/arm64/debian"; else URL="http://openresty.org/package/debian"; fi \
&& echo "deb [arch=$BUILDARCH signed-by=/usr/share/keyrings/openresty.gpg] ${URL} $(lsb_release -sc) openresty" | tee /etc/apt/sources.list.d/openresty.list > /dev/null \
&& apt-get -qq update \
&& apt-get -qq install -y openresty --no-install-recommends

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /var/opt/pingora
COPY . .
RUN cargo build

0 comments on commit 5fdf287

Please sign in to comment.