diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..3de3298 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,19 @@ +kind: pipeline +type: docker +name: Docker image build +trigger: + branch: + - master +steps: + - name: config + image: alpine + commands: + - echo -n "latest" > .tags + - name: build + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: quackerd/dhcpd diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e39a0f7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest +COPY ./run.sh /opt/run.sh +RUN set -xe \ + && apk add --no-cache dhcp \ + && chmod +x /opt/run.sh +VOLUME ["/etc/dhcp"] +CMD ["/opt/run.sh"] + +EXPOSE 67/tcp diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..c3f95f2 --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/sbin/dhcpd -4 -f -d