24 lines
796 B
Docker
24 lines
796 B
Docker
FROM fedora:30 as builder
|
|
RUN dnf install -y cmake gcc gcc-c++ ninja-build glib2-devel
|
|
WORKDIR /home/donar-build
|
|
RUN chown -R 1000 /home/donar-build
|
|
USER 1000
|
|
COPY ./src ./src
|
|
COPY CMakeLists.txt .
|
|
RUN mkdir out && \
|
|
cd out && \
|
|
cmake -GNinja .. && \
|
|
ninja
|
|
|
|
FROM fedora:30
|
|
RUN dnf install -y glib2 tor valgrind nmap-ncat psmisc
|
|
WORKDIR /home/donar
|
|
RUN mkdir /home/donar/shared && mkdir /home/donar/res && chown -R 1000 /home/donar
|
|
USER 1000
|
|
ENV HOME /home/donar
|
|
COPY --from=builder /home/donar-build/out/donar /usr/local/bin
|
|
COPY --from=builder /home/donar-build/out/measlat /usr/local/bin
|
|
COPY --from=builder /home/donar-build/out/udpecho /usr/local/bin
|
|
COPY --from=builder /home/donar-build/out/torecho /usr/local/bin
|
|
COPY ./scripts/* /usr/local/bin/
|
|
COPY ./torrc_simple /etc/torrc
|