conlink 2.5.3 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/push.yml +5 -0
- package/Dockerfile +38 -3
- package/README.md +51 -761
- package/docs/.nojekyll +0 -0
- package/docs/_sidebar.md +9 -0
- package/docs/guides/compose-tools.md +166 -0
- package/docs/guides/examples.md +417 -0
- package/docs/guides/graphviz-rendering.md +32 -0
- package/docs/index.html +33 -0
- package/docs/reference/network-configuration-syntax.md +143 -0
- package/docs/usage-notes.md +50 -0
- package/examples/test11-compose.yaml +48 -0
- package/mdc +4 -1
- package/package.json +6 -2
- package/rust/Cargo.toml +25 -0
- package/rust/src/copy.rs +105 -0
- package/rust/src/echo.rs +4 -0
- package/rust/src/wait.rs +161 -0
- package/src/conlink/core.cljs +3 -11
- package/test/Dockerfile.empty +1 -0
- package/test/dir1/dir2/file2 +1 -0
- package/test/dir1/file1 +1 -0
- package/test/test-utils.yaml +17 -0
- package/test/test11.yaml +26 -0
- package/test/utils-compose.yaml +69 -0
|
@@ -23,6 +23,11 @@ jobs:
|
|
|
23
23
|
timeout-minutes: 5
|
|
24
24
|
run: time node_modules/.bin/dctest --verbose-commands conlink-test $(ls -v test/test*.yaml)
|
|
25
25
|
|
|
26
|
+
- name: "show logs"
|
|
27
|
+
if: always()
|
|
28
|
+
run: |
|
|
29
|
+
docker compose -p conlink-test logs --no-color -t || true
|
|
30
|
+
|
|
26
31
|
- name: Check --show-config and net2dot
|
|
27
32
|
run: |
|
|
28
33
|
cfg=$(./conlink --show-config --compose-file examples/test1-compose.yaml)
|
package/Dockerfile
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
###
|
|
2
|
+
### conlink build (ClojureScript)
|
|
3
|
+
###
|
|
4
|
+
FROM node:16 AS cljs-build
|
|
2
5
|
|
|
3
6
|
RUN apt-get -y update && \
|
|
4
7
|
apt-get -y install libpcap-dev default-jdk-headless
|
|
@@ -19,15 +22,47 @@ RUN cd /app && \
|
|
|
19
22
|
shadow-cljs compile conlink && \
|
|
20
23
|
chmod +x build/*.js
|
|
21
24
|
|
|
25
|
+
###
|
|
26
|
+
### Utilities build (Rust)
|
|
27
|
+
###
|
|
28
|
+
FROM rust:latest AS rust-build
|
|
29
|
+
|
|
30
|
+
RUN rustup target add x86_64-unknown-linux-musl
|
|
31
|
+
|
|
32
|
+
# musl-tools for static linking
|
|
33
|
+
RUN apt-get update && apt-get install -y musl-tools
|
|
34
|
+
|
|
35
|
+
WORKDIR /app/
|
|
36
|
+
RUN mkdir -p src
|
|
37
|
+
|
|
38
|
+
# Download and compile deps for rebuild efficiency
|
|
39
|
+
#COPY Cargo.toml Cargo.lock ./
|
|
40
|
+
COPY rust/Cargo.toml ./
|
|
41
|
+
RUN echo "fn main() {}" > src/echo.rs
|
|
42
|
+
RUN cargo build --release --target x86_64-unknown-linux-musl --bin echo
|
|
43
|
+
RUN rm src/echo.rs # 1
|
|
44
|
+
|
|
45
|
+
# Build the main program
|
|
46
|
+
COPY rust/src/* src/
|
|
47
|
+
RUN cargo build --release --target x86_64-unknown-linux-musl
|
|
48
|
+
RUN cd /app/target/x86_64-unknown-linux-musl/release/ && cp -v wait copy echo /app/
|
|
49
|
+
# Located at: ./target/x86_64-unknown-linux-musl/release/
|
|
50
|
+
|
|
51
|
+
###
|
|
52
|
+
### conlink runtime stage
|
|
53
|
+
###
|
|
22
54
|
FROM node:16-slim AS run
|
|
23
55
|
|
|
24
56
|
RUN apt-get -y update
|
|
25
57
|
# Runtime deps and utilities
|
|
26
58
|
RUN apt-get -y install libpcap-dev tcpdump iproute2 iputils-ping curl \
|
|
27
|
-
iptables bridge-utils ethtool jq \
|
|
59
|
+
iptables bridge-utils ethtool jq netcat socat \
|
|
28
60
|
openvswitch-switch openvswitch-testcontroller
|
|
29
61
|
|
|
30
|
-
|
|
62
|
+
RUN mkdir -p /app /utils
|
|
63
|
+
COPY --from=cljs-build /app/ /app/
|
|
64
|
+
COPY --from=rust-build /app/wait /app/copy /app/echo /utils/
|
|
65
|
+
ADD scripts/wait.sh scripts/copy.sh /utils/
|
|
31
66
|
ADD link-add.sh link-del.sh link-mirred.sh link-forward.sh /app/
|
|
32
67
|
ADD schema.yaml /app/build/
|
|
33
68
|
|