From d08c98ae7d840adcd45cb47d0bd3cc0682a2a4c6 Mon Sep 17 00:00:00 2001 From: Evgeniy Sokolov Date: Wed, 8 Aug 2018 16:35:21 +0200 Subject: [PATCH] fix docker-compose local --- .travis.yml | 1 - files/Dockerfile | 7 ++++--- files/check-install.sh | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 86dbca9..6d17287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: go sudo: required dist: trusty -group: deprecated-2017Q4 git: depth: 3 diff --git a/files/Dockerfile b/files/Dockerfile index 5961cd6..299b086 100644 --- a/files/Dockerfile +++ b/files/Dockerfile @@ -1,9 +1,10 @@ -# check https://docs.travis-ci.com/user/common-build-problems/#Running-a-Container-Based-Docker-Image-Locally +# check https://docs.travis-ci.com/user/common-build-problems/#troubleshooting-locally-in-a-docker-image FROM travisci/ci-garnet:packer-1512502276-986baf0 MAINTAINER Evgenii Sokolov +USER travis ENV GOPATH "/home/travis/gopath" ENV GOROOT "/home/travis/.gimme/versions/go1.7.4.linux.amd64" ENV PATH "$GOPATH/bin:$GOROOT/bin:$PATH" -COPY check-install.sh /tmp -RUN bash /tmp/check-install.sh +COPY . $GOPATH/src/github.com/ru-de/faq/files +RUN cd $GOPATH/src/github.com/ru-de/faq && sudo env PATH=$PATH GOPATH=$GOPATH bash files/check-install.sh diff --git a/files/check-install.sh b/files/check-install.sh index 5ca044a..9cd3c5f 100644 --- a/files/check-install.sh +++ b/files/check-install.sh @@ -29,6 +29,12 @@ for dic in $dicList cat /usr/share/hunspell/$dic.aff | iconv --from ISO8859-1 --to UTF-8 | sed 's/SET ISO8859-1/SET UTF-8/' > /usr/share/hunspell/$dic-utf8.aff done +(cat $DIR/dictionary.dic; echo) | sed '/^$/d' | wc -l > /tmp/dictionary.dic +(cat $DIR/dictionary.dic; echo) | sed '/^$/d' >> /tmp/dictionary.dic + +echo "SET UTF-8" >> /tmp/dictionary.aff +mv /tmp/dictionary.* /usr/share/hunspell + go get ./... go get -u github.com/ewgRa/ci-utils/cmd/diff_liner go get -u github.com/ewgRa/ci-utils/cmd/hunspell_parser @@ -37,9 +43,3 @@ go get -u github.com/ewgRa/ci-utils/cmd/github_comments_send go build -o /tmp/check_spell $DIR/go/check_spell/main.go go build -o /tmp/check_links $DIR/go/check_links/main.go - -(cat $DIR/dictionary.dic; echo) | sed '/^$/d' | wc -l > /tmp/dictionary.dic -(cat $DIR/dictionary.dic; echo) | sed '/^$/d' >> /tmp/dictionary.dic - -echo "SET UTF-8" >> /tmp/dictionary.aff -sudo mv /tmp/dictionary.* /usr/share/hunspell