2019-01-29 12:11:11 +00:00
|
|
|
FROM golang:alpine AS build
|
|
|
|
|
|
|
|
RUN apk add --update git make build-base npm && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
WORKDIR /src/AdGuardHome
|
|
|
|
COPY . /src/AdGuardHome
|
|
|
|
RUN make
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
LABEL maintainer="AdGuard Team <devteam@adguard.com>"
|
|
|
|
|
|
|
|
# Update CA certs
|
2019-04-17 16:24:24 +00:00
|
|
|
RUN apk --no-cache --update add ca-certificates libcap && \
|
2019-05-08 19:17:14 +00:00
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
mkdir -p /opt/adguardhome/conf /opt/adguardhome/work && \
|
|
|
|
chown -R nobody: /opt/adguardhome
|
2019-01-29 12:11:11 +00:00
|
|
|
|
2019-06-04 08:03:13 +00:00
|
|
|
COPY --from=build --chown=nobody:nogroup /src/AdGuardHome/AdGuardHome /opt/adguardhome/AdGuardHome
|
2019-01-29 12:11:11 +00:00
|
|
|
|
2019-05-08 19:17:14 +00:00
|
|
|
RUN setcap 'cap_net_bind_service=+eip' /opt/adguardhome/AdGuardHome
|
2019-04-17 16:24:24 +00:00
|
|
|
|
2019-02-12 08:54:40 +00:00
|
|
|
EXPOSE 53/tcp 53/udp 67/tcp 67/udp 68/tcp 68/udp 80/tcp 443/tcp 853/tcp 853/udp 3000/tcp
|
2019-01-29 12:11:11 +00:00
|
|
|
|
2019-02-11 12:17:49 +00:00
|
|
|
VOLUME ["/opt/adguardhome/conf", "/opt/adguardhome/work"]
|
2019-01-29 12:11:11 +00:00
|
|
|
|
2019-04-17 16:24:24 +00:00
|
|
|
WORKDIR /opt/adguardhome/work
|
|
|
|
|
2019-05-08 19:17:14 +00:00
|
|
|
#USER nobody
|
2019-04-17 16:24:24 +00:00
|
|
|
|
2019-02-11 12:17:49 +00:00
|
|
|
ENTRYPOINT ["/opt/adguardhome/AdGuardHome"]
|
2019-05-28 08:42:50 +00:00
|
|
|
CMD ["-c", "/opt/adguardhome/conf/AdGuardHome.yaml", "-w", "/opt/adguardhome/work", "--no-check-update"]
|