mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
firefox
This commit is contained in:
1
firefox/CHANGELOG.md
Normal file
1
firefox/CHANGELOG.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
- Initial release
|
||||||
55
firefox/Dockerfile
Normal file
55
firefox/Dockerfile
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
ARG BUILD_FROM
|
||||||
|
ARG BUILD_VERSION
|
||||||
|
FROM ${BUILD_FROM}
|
||||||
|
ARG BASHIO_VERSION=0.14.3
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
###################
|
||||||
|
# Install bashio #
|
||||||
|
##################
|
||||||
|
&& mkdir -p /tmp/bashio \
|
||||||
|
&& curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \
|
||||||
|
| tar -xzf - --strip 1 -C /tmp/bashio \
|
||||||
|
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||||
|
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||||
|
&& rm -rf /tmp/bashio || true
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
# use /data instead of /config for hass.io environment
|
||||||
|
sed -i "s|/config|/config/firefox|g" /etc/services.d/firefox/run \
|
||||||
|
&& sed -i "s|/config|/config/firefox|g" /etc/cont-init.d/30-config \
|
||||||
|
\
|
||||||
|
# Allow UID and GID setting
|
||||||
|
&& sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
|
||||||
|
&& sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \
|
||||||
|
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser
|
||||||
|
|
||||||
|
# copy local files
|
||||||
|
COPY root/ /
|
||||||
|
|
||||||
|
### LABELS
|
||||||
|
ARG BUILD_ARCH
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG BUILD_DESCRIPTION
|
||||||
|
ARG BUILD_NAME
|
||||||
|
ARG BUILD_REF
|
||||||
|
ARG BUILD_REPOSITORY
|
||||||
|
ARG BUILD_VERSION
|
||||||
|
LABEL \
|
||||||
|
io.hass.name="${BUILD_NAME}" \
|
||||||
|
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||||
|
io.hass.arch="${BUILD_ARCH}" \
|
||||||
|
io.hass.type="addon" \
|
||||||
|
io.hass.version=${BUILD_VERSION} \
|
||||||
|
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
||||||
|
org.opencontainers.image.title="${BUILD_NAME}" \
|
||||||
|
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
||||||
|
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
||||||
|
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
||||||
|
org.opencontainers.image.licenses="MIT" \
|
||||||
|
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
||||||
|
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
||||||
|
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
||||||
|
org.opencontainers.image.created=${BUILD_DATE} \
|
||||||
|
org.opencontainers.image.revision=${BUILD_REF} \
|
||||||
|
org.opencontainers.image.version=${BUILD_VERSION}
|
||||||
51
firefox/Readme.md
Normal file
51
firefox/Readme.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Home assistant add-on: firefox
|
||||||
|
|
||||||
|
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||||
|
|
||||||
|
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
|
||||||
|
|
||||||
|
![Supports
|
||||||
|
Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield]
|
||||||
|
![Supports smb mounts][smb-shield]
|
||||||
|
|
||||||
|
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
|
||||||
|
|
||||||
|
[](https://github.com/alexbelgium/hassio-addons/stargazers)
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
[firefox](https://github.com/firefox/firefox) is a well known internet browser.
|
||||||
|
This addon is based on the docker image https://github.com/linuxserver/docker-firefox
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Webui can be found at <http://your-ip:PORT>.
|
||||||
|
The default username/password : abc/abc
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.
|
||||||
|
|
||||||
|
1. Add my add-ons repository to your home assistant instance (in supervisor addons store at top right, or click button below if you have configured my HA)
|
||||||
|
[](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons)
|
||||||
|
1. Install this add-on.
|
||||||
|
1. Click the `Save` button to store your configuration.
|
||||||
|
1. Set the add-on options to your preferences
|
||||||
|
1. Start the add-on.
|
||||||
|
1. Check the logs of the add-on to see if everything went well.
|
||||||
|
1. Open the webUI and adapt the software options
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Create an issue on github
|
||||||
|
|
||||||
|
## Illustration
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||||
|
[smb-shield]: https://img.shields.io/badge/smb-yes-green.svg
|
||||||
|
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||||
|
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||||
|
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
|
||||||
|
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||||
48
firefox/apparmor.txt
Normal file
48
firefox/apparmor.txt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#include <tunables/global>
|
||||||
|
|
||||||
|
profile firefox_addon flags=(attach_disconnected,mediate_deleted) {
|
||||||
|
#include <abstractions/base>
|
||||||
|
|
||||||
|
capability,
|
||||||
|
file,
|
||||||
|
mount,
|
||||||
|
umount,
|
||||||
|
remount,
|
||||||
|
|
||||||
|
capability setgid,
|
||||||
|
capability setuid,
|
||||||
|
capability sys_admin,
|
||||||
|
capability dac_read_search,
|
||||||
|
# capability dac_override,
|
||||||
|
# capability sys_rawio,
|
||||||
|
|
||||||
|
# S6-Overlay
|
||||||
|
/bin/** ix,
|
||||||
|
/usr/bin/** ix,
|
||||||
|
/usr/lib/bashio/** ix,
|
||||||
|
/etc/s6/** rix,
|
||||||
|
/run/s6/** rix,
|
||||||
|
/etc/services.d/** rwix,
|
||||||
|
/etc/cont-init.d/** rwix,
|
||||||
|
/etc/cont-finish.d/** rwix,
|
||||||
|
/init rix,
|
||||||
|
/var/run/** mrwkl,
|
||||||
|
/var/run/ mrwkl,
|
||||||
|
/dev/i2c-1 mrwkl,
|
||||||
|
# Files required
|
||||||
|
/dev/sda1 mrwkl,
|
||||||
|
/dev/sdb1 mrwkl,
|
||||||
|
/dev/mmcblk0p1 mrwkl,
|
||||||
|
/dev/* mrwkl,
|
||||||
|
/tmp/** mrkwl,
|
||||||
|
|
||||||
|
# Data access
|
||||||
|
/data/** rw,
|
||||||
|
|
||||||
|
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
||||||
|
ptrace (trace,read) peer=docker-default,
|
||||||
|
|
||||||
|
# docker daemon confinement requires explict allow rule for signal
|
||||||
|
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
||||||
|
|
||||||
|
}
|
||||||
8
firefox/build.json
Normal file
8
firefox/build.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"build_from": {
|
||||||
|
"armhf": "linuxserver/firefox:arm32v7-latest",
|
||||||
|
"armv7": "linuxserver/firefox:arm32v7-latest",
|
||||||
|
"aarch64": "linuxserver/firefox:arm64v8-latest",
|
||||||
|
"amd64": "linuxserver/firefox:amd64-latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
23
firefox/config.json
Normal file
23
firefox/config.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"apparmor": true,
|
||||||
|
"arch": ["aarch64", "amd64", "armv7", "armhf"],
|
||||||
|
"boot": "auto",
|
||||||
|
"description": "Firefox browser accessible from webUI",
|
||||||
|
"environment": {
|
||||||
|
"PUID": "1000",
|
||||||
|
"PGID": "1000",
|
||||||
|
"shm_size": "1gb"
|
||||||
|
},
|
||||||
|
"name": "Firefox",
|
||||||
|
"ports": {
|
||||||
|
"3000/tcp": 3000
|
||||||
|
},
|
||||||
|
"ports_description": {
|
||||||
|
"3000/tcp": "web interface"
|
||||||
|
},
|
||||||
|
"slug": "firefox",
|
||||||
|
"upstream": "78.15.0",
|
||||||
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
|
"version": "78.15.0",
|
||||||
|
"webui": "http://[HOST]:[PORT:3000]"
|
||||||
|
}
|
||||||
BIN
firefox/icon.png
Normal file
BIN
firefox/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
firefox/logo.png
Normal file
BIN
firefox/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
22
firefox/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh
Normal file
22
firefox/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# If dockerfile failed install manually
|
||||||
|
if [ ! -f "/usr/bin/bashio" ]; then
|
||||||
|
echo "Bashio does not exist, executing script"
|
||||||
|
(
|
||||||
|
################
|
||||||
|
# Install apps #
|
||||||
|
################
|
||||||
|
|
||||||
|
###################
|
||||||
|
# Install bashio #
|
||||||
|
##################
|
||||||
|
BASHIO_VERSION=0.14.3
|
||||||
|
mkdir -p /tmp/bashio
|
||||||
|
curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" |
|
||||||
|
tar -xzf - --strip 1 -C /tmp/bashio
|
||||||
|
mv /tmp/bashio/lib /usr/lib/bashio
|
||||||
|
ln -s /usr/lib/bashio/bashio /usr/bin/bashio
|
||||||
|
rm -rf /tmp/bashio
|
||||||
|
) >/dev/null
|
||||||
|
|
||||||
|
fi
|
||||||
39
firefox/root/etc/cont-init.d/00-banner.sh
Normal file
39
firefox/root/etc/cont-init.d/00-banner.sh
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# ==============================================================================
|
||||||
|
# Displays a simple add-on banner on startup
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
if bashio::supervisor.ping; then
|
||||||
|
bashio::log.blue \
|
||||||
|
'-----------------------------------------------------------'
|
||||||
|
bashio::log.blue " Add-on: $(bashio::addon.name)"
|
||||||
|
bashio::log.blue " $(bashio::addon.description)"
|
||||||
|
bashio::log.blue \
|
||||||
|
'-----------------------------------------------------------'
|
||||||
|
|
||||||
|
bashio::log.blue " Add-on version: $(bashio::addon.version)"
|
||||||
|
if bashio::var.true "$(bashio::addon.update_available)"; then
|
||||||
|
bashio::log.magenta ' There is an update available for this add-on!'
|
||||||
|
bashio::log.magenta \
|
||||||
|
" Latest add-on version: $(bashio::addon.version_latest)"
|
||||||
|
bashio::log.magenta ' Please consider upgrading as soon as possible.'
|
||||||
|
else
|
||||||
|
bashio::log.green ' You are running the latest version of this add-on.'
|
||||||
|
fi
|
||||||
|
|
||||||
|
bashio::log.blue " System: $(bashio::info.operating_system)" \
|
||||||
|
" ($(bashio::info.arch) / $(bashio::info.machine))"
|
||||||
|
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
|
||||||
|
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
|
||||||
|
|
||||||
|
bashio::log.blue \
|
||||||
|
'-----------------------------------------------------------'
|
||||||
|
bashio::log.blue \
|
||||||
|
' Please, share the above information when looking for help'
|
||||||
|
bashio::log.blue \
|
||||||
|
' or support in, e.g., GitHub, forums'
|
||||||
|
bashio::log.green \
|
||||||
|
' https://github.com/alexbelgium/hassio-addons'
|
||||||
|
bashio::log.blue \
|
||||||
|
'-----------------------------------------------------------'
|
||||||
|
fi
|
||||||
5
firefox/root/etc/cont-init.d/00-ha-env
Normal file
5
firefox/root/etc/cont-init.d/00-ha-env
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
|
for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do
|
||||||
|
printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user