2024-01-05 15:35:54 +00:00
|
|
|
FROM rust:1-slim-buster
|
2023-12-10 11:52:00 +00:00
|
|
|
WORKDIR .
|
|
|
|
|
|
|
|
ENV GIT_REPO https://github.com/marcua/ayb
|
2024-01-05 15:35:54 +00:00
|
|
|
ENV CHECKOUT main
|
|
|
|
|
|
|
|
RUN apt update
|
|
|
|
RUN apt install -y \
|
|
|
|
build-essential \
|
|
|
|
libssl-dev \
|
|
|
|
openssl \
|
|
|
|
autoconf \
|
|
|
|
bison \
|
|
|
|
flex \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
git \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libnl-route-3-dev \
|
|
|
|
libtool \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
protobuf-compiler
|
2023-12-10 11:52:00 +00:00
|
|
|
|
|
|
|
RUN git clone $GIT_REPO
|
|
|
|
|
2024-01-05 15:35:54 +00:00
|
|
|
# Build nsjail
|
|
|
|
RUN git clone https://github.com/google/nsjail
|
|
|
|
RUN cd ./nsjail && make && mv nsjail ../ayb
|
|
|
|
|
2023-12-10 11:52:00 +00:00
|
|
|
WORKDIR ./ayb
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN git fetch --tags
|
2024-01-14 20:08:27 +00:00
|
|
|
RUN git checkout -f $CHECKOUT
|
2023-12-10 11:52:00 +00:00
|
|
|
|
|
|
|
RUN cargo build --release
|
|
|
|
|
2024-01-05 15:35:54 +00:00
|
|
|
RUN cargo build --release
|
2023-12-10 11:52:00 +00:00
|
|
|
EXPOSE 5433
|
2024-01-05 15:35:54 +00:00
|
|
|
CMD ["./target/release/ayb", "server"]
|