aybDocker/Dockerfile

42 lines
677 B
Text
Raw Normal View History

FROM rust:1-slim-buster
2023-12-10 11:52:00 +00:00
WORKDIR .
ENV GIT_REPO https://github.com/marcua/ayb
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
# 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
RUN cargo build --release
2023-12-10 11:52:00 +00:00
EXPOSE 5433
CMD ["./target/release/ayb", "server"]