Skip to content

Commit

Permalink
fix(build): fixed permission bug for docker start script
Browse files Browse the repository at this point in the history
  • Loading branch information
gh0st42 committed Feb 12, 2024
1 parent 2d6694b commit 49f5603
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
2 changes: 1 addition & 1 deletion core/dtn7/src/core/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn rnd_peer() -> DtnPeer {
}

/// Peer Connection URL Parsing Errors
#[derive(Error, Debug, PartialEq)]
#[derive(Error, Debug, PartialEq, Eq)]
pub enum ParsePeerUrlError {
#[error("invalid URL format error")]
InvalidUrl,
Expand Down
24 changes: 8 additions & 16 deletions dockerfiles/Dockerfile.debian-bookwork-slim
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
ARG ARCH=
FROM docker.io/rust:1.76 as builder

FROM ${ARCH}rust:1.75 as builder

WORKDIR /root
#RUN rustup component add rustfmt
#RUN git clone https://github.com/dtn7/dtn7-rs && cd dtn7-rs && \
# git checkout 43fac1cc2ead3a8fa9e1825f8265a77dd9298daa && \
WORKDIR /root/
COPY . dtn7
RUN cd dtn7 && \
cargo install --locked --bins --examples --root /usr/local --path examples && \
cargo install --locked --bins --examples --root /usr/local --path core/dtn7
RUN cargo install --locked --bins --examples --root /usr/local dtn7-plus --git https://github.com/dtn7/dtn7-plus-rs --rev 010202e56 dtn7-plus

FROM debian:bookworm-slim
FROM docker.io/debian:bookworm-slim

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt install net-tools iproute2 iputils-ping tcpdump wget curl -y

WORKDIR /opt
# RUN wget https://github.com/dtn7/dtn7-rs/releases/download/v0.19.0/dtn7-0.19.0-x86_64-unknown-linux-musl.tar.gz && \
# mkdir -p /opt/dtn7 && \
# tar -xvf dtn7-0.19.0-x86_64-unknown-linux-musl.tar.gz -C /opt/dtn7 --strip-components=1 && \
# rm dtn7-0.19.0-x86_64-unknown-linux-musl.tar.gz && \
# cp /opt/dtn7/bin/* /usr/local/bin && \
# cp /opt/dtn7/examples/* /usr/local/bin

WORKDIR /
COPY --from=builder /usr/local/bin/* /usr/local/bin/

COPY dockerfiles/start_dtnd /usr/local/bin/start_dtnd

ENV PATH="${PATH}:/usr/local/bin:/usr/local/sbin"

HEALTHCHECK --interval=60s --timeout=10s --start-period=15s --retries=3 \
CMD curl --fail http://localhost:3000 || exit 1


ENTRYPOINT [ "start_dtnd" ]
Empty file modified dockerfiles/start_dtnd
100644 → 100755
Empty file.

0 comments on commit 49f5603

Please sign in to comment.