Skip to content

Commit 5fdf287

Browse files
authored
dev: add dockerfile for local dev (#172)
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
1 parent 07f6854 commit 5fdf287

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM debian:latest as builder
2+
3+
ARG BUILDARCH
4+
RUN apt-get -qq update \
5+
&& apt-get -qq install -y --no-install-recommends \
6+
gcc g++ libfindbin-libs-perl \
7+
make cmake libclang-dev git \
8+
wget curl gnupg ca-certificates lsb-release \
9+
&& wget --no-check-certificate -O - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty.gpg \
10+
&& if [ "${BUILDARCH}" = "arm64" ]; then URL="http://openresty.org/package/arm64/debian"; else URL="http://openresty.org/package/debian"; fi \
11+
&& 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 \
12+
&& apt-get -qq update \
13+
&& apt-get -qq install -y openresty --no-install-recommends
14+
15+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
16+
ENV PATH="/root/.cargo/bin:${PATH}"
17+
18+
WORKDIR /var/opt/pingora
19+
COPY . .
20+
RUN cargo build

0 commit comments

Comments
 (0)