mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-22 16:33:17 +00:00
2354b62f43
* Add script to install ftp server * Grep only the first ip address to avoid capturing the docker ip address * Consistently use --assume-yes and --no-install-recommends with apt-get * Capture corner case where both rascsi and piscsi groups exist * Add CI/CD dependency of easyinstall.sh * Update the run choices
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
FROM debian:bullseye AS build
|
|
RUN apt-get update && apt-get install --assume-yes --no-install-recommends sudo
|
|
RUN groupadd pi \
|
|
&& useradd --create-home --shell /bin/bash -g pi pi \
|
|
&& echo "pi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
|
|
USER pi
|
|
WORKDIR /home/pi/piscsi
|
|
|
|
COPY --chown=pi:pi easyinstall.sh .
|
|
COPY --chown=pi:pi cpp cpp
|
|
COPY --chown=pi:pi doc doc
|
|
RUN ./easyinstall.sh --run_choice=16 --cores=`nproc`
|
|
|
|
FROM debian:bullseye-slim AS runner
|
|
USER root
|
|
WORKDIR /home/pi
|
|
|
|
COPY --from=build /home/pi/piscsi/cpp/bin/fullspec/* /usr/local/bin/
|
|
COPY docker/backend/piscsi_wrapper.sh /usr/local/bin/piscsi_wrapper.sh
|
|
RUN chmod +x /usr/local/bin/*
|
|
RUN mkdir -p /home/pi/images
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install --no-install-recommends --assume-yes libpcap-dev libprotobuf-dev \
|
|
&& apt autoremove -y \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
EXPOSE 6868
|
|
ENTRYPOINT ["/usr/local/bin/piscsi_wrapper.sh", "-r", "7", "-F", "/home/pi/images"]
|
|
CMD ["-L", "trace"]
|
|
|
|
HEALTHCHECK --interval=5m --timeout=1s CMD scsictl -v
|