.
This commit is contained in:
parent
87028146df
commit
7a40fda341
BIN
.gitea/workflows/.image-build.yaml.swp
Normal file
BIN
.gitea/workflows/.image-build.yaml.swp
Normal file
Binary file not shown.
21
.gitea/workflows/image-build.yaml
Normal file
21
.gitea/workflows/image-build.yaml
Normal 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
17
Containerfile
Normal 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
30
entrypoint.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user