Commit 325bf574 authored by yousiki's avatar yousiki

from Docker-Images repo

parent dd01ca3f
language: bash
dist: bionic
services:
- docker
branches:
only:
- master
env:
global:
- DOCKER_USERNAME=yousiki
- DOCKER_IMAGE=smartdns
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export IMAGE_NAME=$DOCKER_USERNAME/$DOCKER_IMAGE:latest
- docker build -t $IMAGE_NAME .
- travis_wait 30 docker push $IMAGE_NAME
\ No newline at end of file
FROM ubuntu:latest AS downloader
RUN apt update && \
apt install -y curl wget
ADD downloader.sh downloader.sh
RUN sh downloader.sh
FROM ubuntu:latest
COPY --from=downloader /smartdns.deb /
RUN dpkg -i *.deb && rm *.deb && mkdir -p /var/log/smartdns
EXPOSE 53/tcp
EXPOSE 53/udp
VOLUME [ "/etc/smartdns" ]
ENTRYPOINT [ "smartdns" ]
CMD ["-f -c /etc/smartdns/smartdns.conf"]
\ No newline at end of file
curl -s https://api.github.com/repos/pymumu/smartdns/releases/latest \
| grep browser_download_url \
| grep $(arch) \
| grep deb \
| cut -d '"' -f 4 \
| wget -i - -O smartdns.deb
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment