# WiFi-connect installation in Raspberry Pi Docker container

**URL:** <https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386>\
**Category:** Project help\
**Created:** [December 25, 2020, 7:26pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386 "2020-12-25T19:26:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 25, 2020, 7:26pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/1 "2020-12-25T19:26:26Z")

</div>

Hi Balena support team!

I’m having a very hard time installing wifi-connect app in my raspberry pi docker container.

> **[GitHub - balena-os/wifi-connect: Easy WiFi setup for Linux devices from your...](https://github.com/balena-os/wifi-connect)**
>
> Easy WiFi setup for Linux devices from your mobile phone or laptop - GitHub - balena-os/wifi-connect: Easy WiFi setup for Linux devices from your mobile phone or laptop

I downloaded the wifi-connect source on my pi and built a docker image by using a Dockerfile. Below is a part of Dockerfile related to wifi-connect app installation.  
 ![image](https://global.discourse-cdn.com/balena/original/2X/1/196cef640fe5aa7210bdcf63503f1ed71f186e64.png)  
But I got the following error while running raspbian-install.sh.  
**WiFi Connect Raspbian Installer: command failed: _systemctl_ not found**

So I installed systemd in my docker container by apt-get install systemd  
After that, I run the shell file again, but I also got an error saying that _sudo command not found_  
So I removed all _sudo_ in the script and rerun it. Then I got another error.  
**WiFi Connect Raspbian Installer: command failed: systemctl -p LoadState --value show NetworkManager**

I tried to solve this error, but I didn’t any solution for it.  
And I tried other ways to install wifi-connect app in the docker container, but they didn’t work for me.

- How can I solve the error above?
- Is there a better solution to install this app in the Raspberry Pi docker container?
- Is it possible to install this balena app as a docker container? I see some description for using this app as a docker container in README. But is that only possible when using balenaOS? I see a docker image named as wifi-connect in dockerhub. Can I use it using docker-compose file?

Thanks in advance.  
Anatoli

---

<div class="post-metadata">

**Author:** ![Ereski](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@Ereski](https://forums.balena.io/u/Ereski)\
**Post date:** [December 25, 2020, 7:50pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/4 "2020-12-25T19:50:38Z")

</div>

If in a container, wifi-connect needs host networking and access to the system’s dbus bus. So you need to run the wifi-connect container in a way similar to this:

```auto
$ docker run --network=host -v /run/dbus/:/run/dbus/ wifi-connect

```

You may need to tweak this command and maybe set the `DBUS_SYSTEM_BUS_ADDRESS` env var depending on how dbus is set up both inside raspbian and inside the container.

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 25, 2020, 9:23pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/6 "2020-12-25T21:23:22Z")

</div>

Hi @Ereski  
Thanks for your quick reply.

I’ll try this command.

```
$ docker run --network=host -v /run/dbus/:/run/dbus/ wifi-connect

```

Could you please let me know how to set _DBUS\_SYSTEM\_BUS\_ADDRESS env_ for my case? I am new to docker setup.

I still have a question. I’d like to know if I can add the following service to my **docker-compose.yml** to install wifi-connect container.

```
version: '3'

services:
    wifi-connect:
        build: ./wifi-connect
        network_mode: "host"
        labels:
            io.balena.features.dbus: '1'
        cap_add:
            - NET_ADMIN
        environment:
            DBUS_SYSTEM_BUS_ADDRESS: "unix:path=/host/run/dbus/system_bus_socket"

```

As you can see, the docker-compose file version I’m using is ‘3’.  
I want to run wifi-connect container using docker-compose as much as possible because I don’t want to use manual command like **docker run**. Can I add the above service to my docker-compose.yml file without any change?

---

<div class="post-metadata">

**Author:** ![20k-ultra](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/20k-ultra/32/3435_2.png) [@20k-ultra](https://forums.balena.io/u/20k-ultra)\
**Post date:** [December 25, 2020, 9:58pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/7 "2020-12-25T21:58:32Z")

</div>

That looks correct however, Balena does not support version 3 docker-compose configurations. Checkout [https://github.com/balena-io-examples/balena-multiapp-project](https://github.com/balena-io-examples/balena-multiapp-project) for a complete example project using wifi-connect in a docker-compose file. Note this setup uses `privileged: true` for the wifi-connect but that is not needed since you’re adding the network admin privileges to the container.

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 25, 2020, 10:05pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/8 "2020-12-25T22:05:35Z")

</div>

Thanks for your reply.  
I just tried this.

```
$ docker run --network=host -v /run/dbus/:/run/dbus/ wifi-connect

```

But I got the following error.

 ![image](https://global.discourse-cdn.com/balena/original/2X/8/852a178fc99d21962366d5382b697ca7193e9802.png)  
I have already logged in to [dockerhub.com](http://dockerhub.com) on my raspberry pi.  
Can I solve this issue?

Anatoli

---

<div class="post-metadata">

**Author:** ![20k-ultra](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/20k-ultra/32/3435_2.png) [@20k-ultra](https://forums.balena.io/u/20k-ultra)\
**Post date:** [December 25, 2020, 10:52pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/9 "2020-12-25T22:52:32Z")

</div>

When you use `docker run` it checks the local machine for any image tagged wifi-connect then the registry on docker hub. If no profile is specified for a repository then docker by default adds the library user. So what your command just did is try to find a locally built wifi-connect image but didn’t so it then looked in the registry for an image tagged library/wifi-connect which does not exist.

The wifi-connect repository is just the project source code itself. There are no published images. If you want to run a built image of wifi-connect then you want to use one of the images from: [https://hub.docker.com/r/balenablocks/wifi-connect/tags?page=1&ordering=last\_updated](https://hub.docker.com/r/balenablocks/wifi-connect/tags?page=1&ordering=last_updated). Those images are published from [https://github.com/balenablocks/wifi-connect](https://github.com/balenablocks/wifi-connect) which is apart of our work to help make these balena projects easier to deploy.

We have a blog post that also explains what we’re trying to do with balengaBlocks [https://www.balena.io/blog/introducing-balenablocks-jumpstart-your-iot-app-development/](https://www.balena.io/blog/introducing-balenablocks-jumpstart-your-iot-app-development/).

If you’re running balenaOS I would highly advise against managing containers yourself and rather just add them to your release. If this is not the case then make sure to include `--cap-add=NET_ADMIN` to the docker run you shared.

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 26, 2020, 8:53pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/10 "2020-12-26T20:53:21Z")

</div>

Hi @20k-ultra  
How are you?

I have tried two ways to install **wifi-connnect** on my raspberry pi4.  
However, they didn’t work for me. I’m using Raspbian OS, not balenaOS.  
Here are the test results.

1. Using _docker run_ command

2. Adding a service for wifi-connect to docker-compose.yml  
I have added a service for wifi-connect to my docker-compose.yml file and built a new docker image.  

The basic reason I want to run this app in Docker is that I need to run it using the **sudo wifi-connect** command in a web container that works on the same Docker image. The wifi-connect app is working well outside the docker image. But I need to run this app in the docker container.

I am really struggling with this! How can I achieve this purpose? How can I solve the above issues?  
I really want you come up with a good solution.

Anatoli.

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 28, 2020, 1:55pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/12 "2020-12-28T13:55:27Z")

</div>

Hi @20k-ultra

How are you? I’m still waiting for your reply.  
As you recommended two days ago, I have followed the following git repository to make wifi-connect container.

> **[balena-io-examples/balena-multiapp-project](https://github.com/balena-io-examples/balena-multiapp-project)**
>
> Sample project to demonstrate how to integrate several existing balena projects in one

  
I made two changes in **docker-compose.yml** and **Dockerfile.template** before building the image.
1. I disabled all other services from **docker-compose.yml** except for **wifi-connect service**.

2. I replaced **FROM balenalib/%%BALENA\_MACHINE\_NAME%%-debian** with the following line in Dockerfile.template.

3. Renamed Dockerfile.template as Dockerfile.

After making the above three changes, I run **docker-compose up -d --build** , but I got the following error in the step 4.

 ![image](https://global.discourse-cdn.com/balena/original/2X/5/51b1808ff0d942b1afa825b8329466066f493040.png)

I am using pi 4 and have installed the latest version of raspbianOS. Is it really impossible to have a wifi-connect container running on RaspbianOS? Or did I make a mistake anywhere?  
Otherwise, the wifi-connect app can run as docker container only on balenaOS?

Anatoli

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [December 28, 2020, 2:06pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/13 "2020-12-28T14:06:16Z")

</div>

You need to replace the %%RESIN\_ARCH%% template variable with the correct architecture you need, because it is specific to Balena and Dockerfile.template, and not a regular Dockerfile. So this will be either `armv7hf` or `aarch64` depending on whether you run a 32-bit or 64-bit Raspbian.

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 29, 2020, 8:20am UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/15 "2020-12-29T08:20:42Z")

</div>

Hi @majorz

Thanks for your help. I built the docker image and run it without any issue as you told me, but I still have some questions.

1. How to run **wifi-connect** in the docker container?  
I see the wifi-connect container is working by **docker ps** command. Does it mean that the **wifi-connect** is running? If so, I’ll have to see the raspberry pi that works as an AP, but I didn’t see it.  
As you know, when I installed **wifi-connect** outside the docker, I have to type **sudo wifi-connect** command to run it. Inside the container, how can I run this app?

2. Is it possible to run **wifi connect** on the different web container?  
The ultimate goal was to run this app on the different web container when needed.  
The web container service and **wifi connect** container service have been defined in the same **docker-compose.yml** file. The web container has a function that runs **sudo wifi-connect** command when clicking a button on web page. So I’d like to know if I can call **wifi-connect** installed on its container from another container.  
I hope you understand my idea.

3. Is it possible to install and run **wifi-connect** inside the web container?  
I want to use **wifi connect** app inside the web docker container running on my raspberry. In that case, I can call it anytime in the web container.  
I download the wifi-connect git repository on the web container and executed **raspbian-install.sh** file like installing it in Raspberry Pi without using dokcer, but I got some errors. I already solved some problems, but I can’t fix the following error.  

I’m very struggling with this problem for a few days. Please help me!

Thanks  
Anatoli

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [December 30, 2020, 4:47pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/19 "2020-12-30T16:47:54Z")

</div>

[`raspbian-install.sh`](https://github.com/balena-io/wifi-connect/blob/master/scripts/raspbian-install.sh) is supposed to be run on raspbian, not in a container.  
It disables dhcpcd and installs NetworkManager and wifi-connect.  
NetworkManager must be running on the host OS, not in the container.

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [December 30, 2020, 4:54pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/20 "2020-12-30T16:54:28Z")

</div>

You’ll need to:

- install NetworkManager on the host OS (raspbian)
- bind-mount `/run/dbus/` on the host to `/host/run/dbus/` in the container
- define the env var `DBUS_SYSTEM_BUS_ADDRESS` to `unix:path=/host/run/dbus/system_bus_socket` in the container
- install and start wifi-connect as in this Dockerfile [https://github.com/balena-io/wifi-connect/blob/master/Dockerfile.template](https://github.com/balena-io/wifi-connect/blob/master/Dockerfile.template)

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 30, 2020, 8:12pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/22 "2020-12-30T20:12:31Z")

</div>

Hi Alexis,

I’m a little confused.  
Those steps are for installing and starting wifi-connect in the web container? Or those steps are for building and starting a container for wifi-connect only?  
I just need to install and run wifi-connect in the web container.

In the step4, it’s to build and run a container for wifi-connect. Right?  
Or should I run all commands inside the web container?

Or

---

<div class="post-metadata">

**Author:** ![Ereski](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@Ereski](https://forums.balena.io/u/Ereski)\
**Post date:** [December 30, 2020, 8:33pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/23 "2020-12-30T20:33:13Z")

</div>

Hi. What do you mean by web container? Could you explain in more detail in what environment you want to use `wifi-connect`?

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 30, 2020, 9:31pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/24 "2020-12-30T21:31:11Z")

</div>

Sorry to confuse you! I’ll explain my work in detail.

Here is my docker-compose.yml file.

 ![image](https://global.discourse-cdn.com/balena/original/2X/6/6180b9624ffeebbbb3dfae42cdf4390ec79451a9.png)

As you can see, there are two services. One of them is for a web container(django).  
This web docker image is built based on Dokcerfile-dev.  
I have already run two containers using **docker-compose up -d --build** command. They’re working well.  
I want to install and run **wifi-connect** inside the web container(django). In order to do that, I added a volume and environment to docker-compose.yml file as follows.

```
- /var/run/dbus/system_bus_socket:/host/var/run/dbus/system_bus_socket
- DBUS_SYSTEM_BUS_ADDRESS="unix:path=/host/run/dbus/system_bus_socket"

```

And I added **RUN apt-get install -y systemd** and **RUN apt-get install -y dbus** to Dockerfile for the web container because **systemd** and **dbus** are needed to install wifi-connect.  
Here is Dockerfile for the web container.

```
FROM python:3.7.3
ENV PYTHONUNBUFFERED=0
WORKDIR /app
ADD requirements.txt /app/
RUN pip3 install -r requirements.txt
RUN pip3 install netifaces

RUN apt-get install -y systemd
RUN apt-get install -y dbus
RUN apt-get install -y supervisor
RUN service supervisor restart

COPY . /app
ADD uart.conf /etc/supervisor/conf.d
ADD net_monitor.conf /etc/supervisor/conf.d

WORKDIR /app/wifi-connect/scripts
RUN chmod +x raspbian-install.sh

WORKDIR /app
RUN chmod 774 docker-entrypoint.sh
ENTRYPOINT ["bash", "docker-entrypoint.sh"]

```

As you can see, the web container includes balena-io/wifi-connect git source.  
After building the docker image using **docker-compose up -d --build** command, two containers are working well.  
I went into the django container and tried to install and run wifi-connect.  
The problem is from now on.  
When I run **raspbian-installer.sh** file in django container, I got the following error.

```
pi@raspberrypi:~/DTECTS_SW_Server_Side $ docker exec -it d8426c7fa4c8 /bin/bash
root@d8426c7fa4c8:/app# bash wifi-connect/scripts/raspbian-install.sh
WiFi Connect Raspbian Installer: Retrieving latest release from https://api.github.com/repos/balena-io/wifi-connect/releases/latest...
WiFi Connect Raspbian Installer: Downloading and extracting https://github.com/balena-io/wifi-connect/releases/download/v4.4.4/wifi-connect-v4.4.4-linux-rpi.tar.gz...
WiFi Connect Raspbian Installer: Successfully installed wifi-connect 4.4.4
Failed to connect to bus: Connection refused
WiFi Connect Raspbian Installer: command failed: systemctl -p LoadState --value show NetworkManager

```

I have already installed wifi-connect on hostOS (raspbian). I think it means that NetworkManager has been already installed. And as I mentioned above, I mounted dbus in host OS to dbus in the container.  
But I still have the same error.  
I hope the above explanation helps you understand my problems  
How can I solve this problem?  
If you are not sure, please let me know.

Anatoli

---

<div class="post-metadata">

**Author:** ![jakogut](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jakogut](https://forums.balena.io/u/jakogut)\
**Post date:** [December 31, 2020, 12:36am UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/25 "2020-12-31T00:36:24Z")

</div>

Hi Anatoli,

Is there a reason you want to run wifi-connect in the same container as your Django app?

My understanding of the project is that the `raspbian-install.sh` script is meant to automate installing wifi-connect on Raspbian outside of a container. You might encounter issues with using it inside a container, especially one running another app.

What might work better is running wifi-connect as a separate service. See balena-dash as an example. [https://github.com/balenalabs/balena-dash](https://github.com/balenalabs/balena-dash)

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [December 31, 2020, 6:32am UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/28 "2020-12-31T06:32:50Z")

</div>

Hi Joseph,

The basic reason I want to install and run **wifi-connect** in the web container is to run **wifi-connector** when the user clicks a button on a web page. The djagon backend running on the web container should execute **sudo wifi-connect** command when the user clicks **AP mode** button on the web page. In order to do that, wifi-connect should be installed in the web container.  
Does it make sense?  
If the we have a specific container only for wifi-connect, is there any way to call **wifi-connect** from the web container?  
I am really struggling with this for a few days! How can I achieve this purpose?  
I really want you come up with a good solution.

---

<div class="post-metadata">

**Author:** ![iamsolankiamit](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@iamsolankiamit](https://forums.balena.io/u/iamsolankiamit)\
**Post date:** [December 31, 2020, 8:09am UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/29 "2020-12-31T08:09:06Z")

</div>

Hi Anatoli,

You can run `wifi-connect` from within your python container. You’d need to install the latest version of wifi-connect in your container to have access to it.

You can refer to this playground project for reference on how to do that: [https://github.com/balena-io-playground/balena-wifi-connect-example](https://github.com/balena-io-playground/balena-wifi-connect-example)

_Note: The reference project is a bit old and you might have to replace `resin` with `balena` at places._

---

<div class="post-metadata">

**Author:** ![Anatoli](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anatoli](https://forums.balena.io/u/Anatoli)\
**Post date:** [January 4, 2021, 11:56pm UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/31 "2021-01-04T23:56:16Z")

</div>

Hi Amit,  
Happy new year! Thanks for your help.

As you told, this repository is old. So I needed to make some changes on Dockerfile and start.sh file.  
First of all, I disabled all other features except for **wifi-connect** in Dockerfile.  
And I replaced **resin** with **balena**. You can see the modified Dockerfile and start.sh below.

 ![image](https://global.discourse-cdn.com/balena/original/2X/c/c875b3331d971ff7663c22d0f4c5a6aebd5c54fd.png)

In order to run the container, I had to add some options to **docker run** as follows.

```
docker run --mount type=bind,source=/run/dbus/system_bus_socket,target=/host/run/dbus/system_bus_socket -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/host/run/dbus/system_bus_socket" test:1.0

```

Here test:1.0 is a tag attached to the image I built using the above Dockerfile.  
When I run docker container with above command, I see the follow error.

```
pi@raspberrypi:~/balena-wifi-connect-example $ docker run --mount type=bind,source=/run/dbus/system_bus_socket,target=/host/run/dbus/system_bus_socket -e DBUS_SYSTEM_BUS_ADDRESS="unix:path=/host/run/dbus/system_bus_socket" test:1.0
Deleting already created by WiFi Connect access point connection profile: "WiFi Connect"
WiFi device: wlan0
Access points: ["Almond3d21"]
Starting access point...
Access point 'WiFi Connect' created
Starting HTTP server on 192.168.42.1:80
Error: Cannot start HTTP server on '192.168.42.1:80': address not available

```

As you can see, an error occurs in the process of starting the AP server on 192.168.42.1.180.  
Your solution seems to be most effective solution I’ve ever tried.  
Is there any way to resolve the above error?  
In the modified Dockerfile I see **ENV DEVICE\_TYPE=%%RESIN\_MACHINE\_NAME%%**.  
Should I replace **%%RESIN\_MACHINE\_NAME%%** with **raspberry pi4**? (I’m using Raspberry PI4)

I hope you get back to you with the best solution.

Thanks  
Anatoli

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [January 5, 2021, 11:42am UTC](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386/32 "2021-01-05T11:42:16Z")

</div>

> Error: Cannot start HTTP server on ‘192.168.42.1:80’: address not available

wifi-connect needs to start a web server on port 80.  
This port is already being used (most probably by your web application).  
Thus wifi-connect can not start.

You can change the port used by wifi-connect, see [https://github.com/balena-io/wifi-connect/blob/master/docs/command-line-arguments.md](https://github.com/balena-io/wifi-connect/blob/master/docs/command-line-arguments.md)

[Next page](https://forums.balena.io/t/wifi-connect-installation-in-raspberry-pi-docker-container/229386.md?page=2)
