sjqzhang / go-fastdfs

go-fastdfs 是一个简单的分布式文件系统(私有云存储),具有无中心、高性能,高可靠,免维护等优点,支持断点续传,分块上传,小文件合并,自动同步,自动修复。Go-fastdfs is a simple distributed file system (private cloud storage), with no center, high performance, high reliability, maintenance free and other advantages, support breakpoint continuation, block upload, small file merge, automatic synchronization, automatic repair.(similar fastdfs).
https://gitee.com/sjqzhang/go-fastdfs
The Unlicense
3.94k stars 747 forks source link

docker-compose not working #305

Closed changchichung closed 3 years ago

changchichung commented 3 years ago

操作過程如下 請問有什麼建議的排除方法?

chchang@hqdc039:~/git$ git clone https://github.com/sjqzhang/go-fastdfs
正複製到 'go-fastdfs'...
remote: Enumerating objects: 3554, done.
remote: Counting objects: 100% (896/896), done.
remote: Compressing objects: 100% (641/641), done.
remote: Total 3554 (delta 381), reused 667 (delta 204), pack-reused 2658
接收物件中: 100% (3554/3554), 38.45 MiB | 6.31 MiB/s, 完成.
處理 delta 中: 100% (1561/1561), 完成.
chchang@hqdc039:~/git$ cd go-fastdfs/docker-compose
chchang@hqdc039:~/git/go-fastdfs/docker-compose$ docker-compose up -d
Building fastdfs
Step 1/13 : FROM registry.cn-hangzhou.aliyuncs.com/prince/alpine-golang:1.11.5 as builder
 ---> 10a795ac5d01
Step 2/13 : MAINTAINER prince <8923052@qq.com>
 ---> Using cache
 ---> c5ff20b9fe3e
Step 3/13 : ARG VERSION=1.1.7
 ---> Using cache
 ---> f2a9905d9eb2
Step 4/13 : RUN set -xe;    apk update;     apk add --no-cache --virtual .build-deps    git;    cd /go/src/;    git clone https://github.com/sjqzhang/go-fastdfs.git;   cd go-fastdfs;  go get;     CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o fileserver;  ls -lh .;
 ---> Running in 18a82ae155ed
+ apk update
fetch http://mirrors.aliyun.com/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.aliyun.com/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.5-67-gf94de196ca [http://mirrors.aliyun.com/alpine/v3.8/main]
v3.8.5-66-gccbd6a8ae7 [http://mirrors.aliyun.com/alpine/v3.8/community]
OK: 9572 distinct packages available
+ apk add --no-cache --virtual .build-deps git
fetch http://mirrors.aliyun.com/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.aliyun.com/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20191127-r2)
(2/8) Installing nghttp2-libs (1.39.2-r0)
(3/8) Installing libssh2 (1.9.0-r1)
(4/8) Installing libcurl (7.61.1-r3)
(5/8) Installing expat (2.2.8-r0)
(6/8) Installing pcre2 (10.31-r0)
(7/8) Installing git (2.18.4-r0)
(8/8) Installing .build-deps (0)
Executing busybox-1.28.4-r2.trigger
Executing ca-certificates-20191127-r2.trigger
OK: 28 MiB in 27 packages
+ cd /go/src/
+ git clone https://github.com/sjqzhang/go-fastdfs.git
Cloning into 'go-fastdfs'...
+ cd go-fastdfs
+ go get
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
    ignoring go.mod;
    see 'go help modules'
# github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:22:24: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:383:26: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:423:24: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:435:27: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:473:25: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:484:20: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:499:38: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:525:21: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:562:28: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:587:29: undefined: io.StringWriter
../github.com/sjqzhang/go-fastdfs/vendor/github.com/spf13/cobra/bash_completions.go:587:29: too many errors
# go-fastdfs/vendor/github.com/spf13/cobra
vendor/github.com/spf13/cobra/bash_completions.go:22:24: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:383:26: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:423:24: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:435:27: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:473:25: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:484:20: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:499:38: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:525:21: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:562:28: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:587:29: undefined: io.StringWriter
vendor/github.com/spf13/cobra/bash_completions.go:587:29: too many errors
ERROR: Service 'fastdfs' failed to build: The command '/bin/sh -c set -xe;  apk update;     apk add --no-cache --virtual .build-deps    git;    cd /go/src/;    git clone https://github.com/sjqzhang/go-fastdfs.git;   cd go-fastdfs;  go get;     CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o fileserver;  ls -lh .;' returned a non-zero code: 2
chchang@hqdc039:~/git/go-fastdfs/docker-compose$ 
sjqzhang commented 3 years ago

将网络调整为主机网络,所以端口不能冲突。