Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build docker images
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
schedule:
# Cron execution is for weekly dependencies update (for security update)
# ┌───────────── minute (0 - 59)
Expand All @@ -26,14 +28,6 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1

# Only if you want the image to be push to docker.io instead of the GitHub Package repository
# - name: Docker login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

# Comment this if you prefer to use the docker.io image repository | This method can be better because it didn't need any password (use the credentials of the people who commit)
- name: Docker login to GitHub
uses: docker/login-action@v1
with:
Expand All @@ -43,7 +37,7 @@ jobs:

- name: Prepare available platforms build
env: # Here you need to test on what platform your docker image can be build. Important one is linux/arm/v7, linux/arm64 and linux/amd64
requested_platforms: "linux/amd64,linux/arm64,linux/386,linux/arm/v7" # alehaa/debian-systemd:buster support only i386, amd64, arm and arm64
requested_platforms: "linux/arm64,linux/arm/v7" # alehaa/debian-systemd:buster support only i386, amd64, arm and arm64
image: "ghcr.io/${{ github.repository }}:latest"
run: |
# If you use the `requested_platforms` env var, then parse it.
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
raspap-ansible

16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
FROM alehaa/debian-systemd:buster
RUN apt update && apt install -y sudo wget procps curl systemd && rm -rf /var/lib/apt/lists/*
COPY setup.sh .
FROM balenalib/raspberrypi3:bullseye-20220714
WORKDIR /app
RUN mkdir -p /etc/wpa_supplicant/
COPY wpa_supplicant.conf /etc/wpa_supplicant/
RUN install_packages ansible git supervisor
# Use different git branch for development
RUN git clone --single-branch --branch jcichra/docker2 https://github.com/jrcichra/raspap-ansible
#RUN git clone https://github.com/RaspAP/raspap-ansible
RUN /bin/bash -c 'cd raspap-ansible && ansible-playbook docker.yaml'
RUN mkdir -p /var/run/lighttpd && chmod 777 /var/run/lighttpd
COPY supervisord.conf /app/
ENTRYPOINT ["/usr/bin/supervisord","-n","-c","/app/supervisord.conf"]

16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
A community-led docker container for RaspAP

# Usage
```
docker run --name raspap -it -d --privileged --network=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN jrcichra/raspap-docker
docker exec -it raspap bash
$ ./setup.sh
docker restart raspap
Web GUI should be accessible on http://localhost by default
```
Copy `dhcpcd.conf` over your `/etc/dhcpcd.conf` file. We're using the `dhcpcd` binary on the host system, but disabling it from managing `wpa_supplicant`. `wpa_supplicant` is managed inside the RaspAP container.
`docker run --name raspap -it -d --privileged jrcichra/raspap-docker`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implement a build system and reference container here (ghcr.io/raspap/raspap-docker)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like PRs are building to latest - need to change some of the tagging around.


The Web GUI should be accessible on http://localhost with the default credentials.

# Known issues
+ No persistence, so settings will be lost if the container is destroyed.
+ The default install configuration works, but many options may not. The container does not run systemd.

19 changes: 19 additions & 0 deletions dhcpcd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# RaspAP default configuration
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname

# RaspAP wlan0 configuration
interface wlan0
static ip_address=10.3.141.1/24
static routers=10.3.141.1
static domain_name_server=9.9.9.9 1.1.1.1
nohook wpa_supplicant

2 changes: 0 additions & 2 deletions setup.sh

This file was deleted.

44 changes: 44 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[unix_http_server]
file=/tmp/supervisor.sock

[supervisord]

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket

[program:lighttpd]
command=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

[program:wpa]
command=/sbin/wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -d -O /run/wpa_supplicant
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

[program:raspapd]
command=/bin/bash /etc/raspap/hostapd/servicestart.sh --interface br0 --seconds 3
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

[program:hostapd]
environment=DAEMON_CONF="/etc/hostapd/hostapd.conf"
command=/bin/bash -c 'source /etc/default/hostapd && /usr/sbin/hostapd -f /tmp/hostapd.log -P /run/hostapd.pid $DAEMON_OPTS ${DAEMON_CONF}'
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

[program:dnsmasq]
command=/usr/sbin/dnsmasq -k -x /run/dnsmasq/dnsmasq.pid -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

[program:network-ansible]
command=/bin/bash -c 'cd raspap-ansible && ansible-playbook docker-runtime.yaml'
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

;[program:dhcpcd]
;command=/sbin/dhcpcd -B -d
;stdout_logfile=/dev/fd/1
;stdout_logfile_maxbytes=0

4 changes: 4 additions & 0 deletions wpa_supplicant.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US