diff --git a/build/Dockerfile b/build/Dockerfile index c9fa616..640ae57 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,19 +1,19 @@ -FROM ubuntu:focal +# ION-DTN Docker image file +# Ryan T. Moran +# +FROM debian:bullseye-slim AS builder -ENV ION_SRC="ipnsig-pwg-main" -ENV ION_VERSION="ion-4.1.0" -ENV ION_CONFIG_FILE="sample.rc" +ENV ION_SRC="ipnsig-pwg-main" \ + ION_VERSION="ion-4.1.0" -WORKDIR /ion_build +WORKDIR /build -ADD ${ION_SRC}.zip . +ADD build/${ION_SRC}.zip . -RUN chown -R 1000.1000 . - - -RUN DEBIAN_FRONTEND=noninteractive apt --no-install-recommends update && \ - apt upgrade && \ - apt install build-essential unzip -y +RUN DEBIAN_FRONTEND=noninteractive \ + apt-get update && \ + apt-get upgrade && \ + apt-get install --no-install-recommends -y build-essential unzip RUN export BUILD_DIR=$(mktemp -d) && \ unzip ${ION_SRC}.zip -d ${BUILD_DIR} && \ @@ -23,13 +23,28 @@ RUN export BUILD_DIR=$(mktemp -d) && \ make install && \ ldconfig -# USER 1000:1000 +FROM debian:bullseye-slim + +RUN DEBIAN_FRONTEND=noninteractive \ + apt-get update && \ + apt-get upgrade && \ + apt-get install --no-install-recommends -y ca-certificates gosu + +COPY --from=builder /usr/local/src /usr/local/src +COPY config/sample.rc /usr/local/etc/ion/ion.rc + +WORKDIR /service + +RUN groupadd -r ionserv && \ + useradd -r -g ionserv ionserv && \ + chown -R ionserv:ionserv /service ENV PATH=/usr/local/src/bin:${PATH} EXPOSE 1113/udp -COPY ./build/docker-entrypoint.sh /usr/bin -ENTRYPOINT ["docker-entrypoint.sh"] +COPY build/docker-entrypoint.sh /usr/bin + +ENTRYPOINT [ "docker-entrypoint.sh" ] -CMD [ "/bin/bash", "-c" ] \ No newline at end of file +# CMD [ "/bin/bash", "-c" ] diff --git a/config/five-node-exit/host10.rc b/config/five-node-exit/host10.rc index cd10e73..fdeadb2 100644 --- a/config/five-node-exit/host10.rc +++ b/config/five-node-exit/host10.rc @@ -1,3 +1,6 @@ +## ION-DTN configuration for node-10 (ipn:10.x) +## Ryan T. Moran + ## begin ionadmin 1 10 '' s @@ -23,10 +26,10 @@ m consumption 10000000 ## begin ltpadmin 1 32 -a span 10 32 32 1400 10000 1 'udplso ion-node-1:1113' 300 -a span 11 32 32 1400 10000 1 'udplso ion-node-2:1113' 300 +a span 10 32 32 1400 10000 1 'udplso ion-node-10:1113' 300 +a span 11 32 32 1400 10000 1 'udplso ion-node-11:1113' 300 -s 'udplsi ion-node-1:1113' +s 'udplsi ion-node-10:1113' ## end ltpadmin ## begin bpadmin @@ -52,4 +55,5 @@ s a plan 10 ltp/10 a plan 11 ltp/11 -## end ipnadmin +a exit 14 14 ipn:11.0 +## end ipnadmin \ No newline at end of file diff --git a/config/two-node/host10.rc b/config/two-node/host10.rc index cd10e73..fa805de 100644 --- a/config/two-node/host10.rc +++ b/config/two-node/host10.rc @@ -1,3 +1,6 @@ +## ION-DTN configuration for node-10 (ipn:10.x) +## Ryan T. Moran + ## begin ionadmin 1 10 '' s