From d033b9ba3d76f50db0c02ec0942b0a3d159c1520 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Tue, 8 Jan 2019 15:15:01 +0800 Subject: [PATCH] Try to fix travis again --- .travis.yml | 18 +++++++++--------- frontend/Dockerfile | 2 +- proxy/Dockerfile | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5399eaa..edd198c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,19 +5,19 @@ language: go go: - "1.10" env: - # - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=i386 + - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=i386 - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=amd64 - # - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm32v7 - # - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm64v8 - # - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=i386 - # - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=amd64 - # - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm32v7 - # - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm64v8 + - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm32v7 + - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=arm64v8 + - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=i386 + - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=amd64 + - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm32v7 + - PROGRAM=proxy IMAGE_NAME=bird-lgproxy-go IMAGE_ARCH=arm64v8 install: - docker run --rm --privileged multiarch/qemu-user-static:register --reset - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - apt-get install -y upx + - sudo apt-get install -y upx script: - | @@ -35,7 +35,7 @@ script: # Build Go binary mkdir build - GOOS=linux GOARCH=$IMAGE_ARCH_GO go build -ldflags="-s -w" -o build/$PROGRAM $PROGRAM/*.go + GOOS=linux GOARCH=$IMAGE_ARCH_GO go build -ldflags="-s -w -linkmode external -extldflags \"-static\"" -o build/$PROGRAM $PROGRAM/*.go upx --best build/$PROGRAM # Build image diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 4f199df..f0e7e2b 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -3,4 +3,4 @@ FROM multiarch/alpine:${THIS_ARCH_ALT}-edge LABEL Lan Tian "lantian@lantian.pub" COPY build/frontend / -ENTRYPOINT ["/lib/ld-musl-x86_64.so.1 /frontend"] +ENTRYPOINT ["/frontend"] diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 9f238c9..c0c04de 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -3,4 +3,4 @@ FROM multiarch/alpine:${THIS_ARCH_ALT}-edge LABEL Lan Tian "lantian@lantian.pub" COPY build/proxy / -ENTRYPOINT ["/lib/ld-musl-x86_64.so.1 /proxy"] +ENTRYPOINT ["/proxy"]