1
BigBrother1024 2019-06-07 11:20:14 +08:00 via Android 1
能,编译放在 dockerfile 里,配置可以根据环境写不同的配置文件
|
2
whoami9894 2019-06-07 11:20:32 +08:00 via Android 1
是,能
|
3
iwishing 2019-06-07 11:43:12 +08:00 1
https://docs.docker.com/v17.09/engine/userguide/eng-image/multistage-build/#before-multi-stage-builds
FROM golang:1.7.3 WORKDIR /go/src/github.com/alexellis/href-counter/ RUN go get -d -v golang.org/x/net/html COPY app.go . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=0 /go/src/github.com/alexellis/href-counter/app . CMD ["./app"] |
4
huangmiao233 OP |
5
ThirdFlame 2019-06-07 12:38:35 +08:00
|
7
fishcg 2019-06-08 03:33:59 +08:00
都可以哦,另外如果要修改某个组件(软件)的配置文件的话,直接 `-v` 挂载目录就好了
|
8
huangmiao233 OP |