.
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 18s
Testing pipes / Explore-Gitea-Actions (push) Successful in 32s

This commit is contained in:
Jonas Forsberg 2024-10-15 11:07:22 +02:00
parent 87028146df
commit 7a40fda341
4 changed files with 68 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,21 @@
??? from here until ???END lines may have been inserted/deleted
name: Lint and Test Charts
on:
push:
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out code
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image
with:
image: azure-agent
registry: repo.rre.nu
dockerfile: Containerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

17
Containerfile Normal file
View File

@ -0,0 +1,17 @@
ARG VERSION
FROM registry.opensuse.org/opensuse/tumbleweed
VOLUME /config
RUN zypper --non-interactive install --no-recommends \
dnsmasq \
&& zypper clean -a \
rm /var/log/zypper.log
ENV TZ="Europe/Stockholm"
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["start"]

30
entrypoint.sh Normal file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
if [[ "$1" == "start" ]]; then
if [[ ! -f /config/dnsmasq.conf ]]; then
echo "* Creating /config/dnsmasq.conf"
sed 's/^conf-dir=\/etc\//conf-dir=\/config\//g' /etc/dnsmasq.conf > /config/dnsmasq.conf
fi
if [[ ! -f /config/hosts/hosts ]]; then
echo "* Creating /config/hosts/hosts"
mkdir /config/hosts
cp /etc/hosts /config/hosts/hosts
fi
if [[ ! -f /config/resolv.conf ]]; then
echo "* Creating /config/resolv.conf"
cp /etc/resolv.conf /config/resolv.conf
fi
if [[ ! -d /config/dnsmasq.d ]]; then
echo "* Creating /config/dnsmasq.d"
mkdir /config/dnsmasq.d
fi
/usr/sbin/dnsmasq \
--conf-fil=/config/dnsmasq.conf \
--no-daemon --no-hosts \
--keep-in-foreground \
--resolv-file=/config/resolv.conf \
--hostsdir=/config/hosts
else
exec "$@"
fi