Skip to content

Commit

Permalink
fix: Disable kernel networking in bridge mode (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Mar 12, 2024
1 parent 9909f95 commit e29ef11
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ jobs:
uses: action-pack/bump@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
-
name: Push to Gitlab mirror
uses: action-pack/gitlab-sync@v3
with:
url: ${{ secrets.GITLAB_URL }}
token: ${{ secrets.GITLAB_TOKEN }}
username: ${{ secrets.GITLAB_USERNAME }}
-
name: Send mail
uses: action-pack/send-mail@v1
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM scratch
COPY --from=qemux/qemu-arm:1.05 / /
COPY --from=qemux/qemu-arm:1.06 / /

ARG DEBCONF_NOWARNINGS="yes"
ARG DEBCONF_NOWARNINGS "yes"
ARG DEBIAN_FRONTEND "noninteractive"
ARG DEBCONF_NONINTERACTIVE_SEEN "true"

Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_
```yaml
environment:
DHCP: "Y"
devices:
- /dev/vhost-net
device_cgroup_rules:
- 'c *:* rwm'
```
Expand Down
7 changes: 6 additions & 1 deletion src/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ trap - ERR
info "Booting $APP using $VERS..."
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo

if [[ "$CONSOLE" == [Yy]* ]]; then
exec qemu-system-x86_64 ${ARGS:+ $ARGS}
fi

{ qemu-system-aarch64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15

Expand All @@ -31,4 +35,5 @@ tail -fn +0 "$QEMU_LOG" 2>/dev/null &
cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" &
wait $! || :

sleep 1 && finish 0
sleep 1 & wait $!
finish 0
4 changes: 4 additions & 0 deletions src/samba.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/env bash
set -Eeuo pipefail

: "${SAMBA:="Y"}"

[[ "$DHCP" == [Yy1]* ]] && return 0
[[ "$SAMBA" != [Yy1]* ]] && return 0
[[ "$NETWORK" != [Yy1]* ]] && return 0

SHARE="$STORAGE/shared"

Expand Down

0 comments on commit e29ef11

Please sign in to comment.