diff options
author | Matthew (mbg) <[email protected]> | 2024-03-29 11:08:34 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-29 11:08:34 -0700 |
commit | 5fdf287c4d6a9ddc8a9caf3447cd27575c13a24c (patch) | |
tree | a5753845f2ed58f6c1ef26a70718c5e4a6d5232a /Dockerfile | |
parent | 07f685402118c403b5d07332dc29d609b616d044 (diff) | |
download | pingora-5fdf287c4d6a9ddc8a9caf3447cd27575c13a24c.tar.gz pingora-5fdf287c4d6a9ddc8a9caf3447cd27575c13a24c.zip |
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
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0fb9ce9 --- /dev/null +++ b/Dockerfile @@ -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 |