diff --git a/.circleci/config.yml b/.circleci/config.yml index 5cfef77..5e84bc6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: docker: - image: circleci/golang:1.8 - working_directory: /go/src/github.com/tellytv/telly + working_directory: /go/src/github.com/zenjabba/telly steps: - checkout diff --git a/Dockerfile b/Dockerfile index fb5a489..a3dc1d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,36 @@ -FROM golang:alpine as builder +FROM ubuntu:16.04 +#FROM golang:alpine as builder # Download and install the latest release of dep -ADD https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 /usr/bin/dep -RUN chmod +x /usr/bin/dep + # Install git because gin/yaml needs it -RUN apk update && apk upgrade && apk add git +RUN apt -y update && apt -y upgrade +RUN apt -y install git && apt -y install ffmpeg curl coreutils +#RUN add-apt-repository ppa:gophers/archive +#RUN apt-get update +#RUN apt-get -y install golang-1.10-go +RUN mkdir /goroot && curl https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1 +RUN mkdir /gopath +ENV GOROOT /goroot +ENV GOPATH /gopath +ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin +ADD https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 /usr/bin/dep +RUN chmod +x /usr/bin/dep # Copy the code from the host and compile it -WORKDIR $GOPATH/src/github.com/tellytv/telly +WORKDIR $GOPATH/src/github.com/zenjabba/telly COPY Gopkg.toml Gopkg.lock ./ RUN dep ensure --vendor-only COPY . ./ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app . # install ca root certificates + listen on 0.0.0.0 + build -RUN apk add --no-cache ca-certificates \ - && find . -type f -print0 | xargs -0 sed -i 's/"listen", "localhost/"listen", "0.0.0.0/g' \ +RUN find . -type f -print0 | xargs -0 sed -i 's/"listen", "localhost/"listen", "0.0.0.0/g' \ && CGO_ENABLED=0 GOOS=linux go install -ldflags '-w -s -extldflags "-static"' FROM scratch -COPY --from=builder /app ./ -COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/ +#COPY --from=builder /app ./ +#COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/ EXPOSE 6077 -ENTRYPOINT ["./app"] +ENTRYPOINT ["/usr/bin/tail", "-f", "/dev/null"] diff --git a/main.go b/main.go index 4aa8f17..ee2f893 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/version" "github.com/sirupsen/logrus" - "github.com/tellytv/telly/m3u" + "github.com/zenjabba/telly/m3u" kingpin "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/structs.go b/structs.go index 01eb301..14e8591 100644 --- a/structs.go +++ b/structs.go @@ -7,7 +7,7 @@ import ( "regexp" "strconv" - "github.com/tellytv/telly/m3u" + "github.com/zenjabba/telly/m3u" ) type config struct {