feat(docker): Add i386 image. (#315)
* feat(docker): Add i386 image. * update drone Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
e516382af2
commit
9aedf8870e
35
.drone.yml
35
.drone.yml
|
@ -32,22 +32,32 @@ pipeline:
|
||||||
- make fmt-check
|
- make fmt-check
|
||||||
|
|
||||||
build_linux_amd64:
|
build_linux_amd64:
|
||||||
image: appleboy/golang-testing:1.9.2
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
group: golang
|
group: golang
|
||||||
commands:
|
commands:
|
||||||
- make docker_build
|
- make build_linux_amd64
|
||||||
|
|
||||||
|
build_linux_i386:
|
||||||
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
|
group: golang
|
||||||
|
commands:
|
||||||
|
- make build_linux_i386
|
||||||
|
|
||||||
build_linux_arm64:
|
build_linux_arm64:
|
||||||
image: appleboy/golang-testing:1.9.2
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
group: golang
|
group: golang
|
||||||
commands:
|
commands:
|
||||||
- make docker_build_arm64
|
- make build_linux_arm64
|
||||||
|
|
||||||
build_linux_arm:
|
build_linux_arm:
|
||||||
image: appleboy/golang-testing:1.9.2
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
group: golang
|
group: golang
|
||||||
commands:
|
commands:
|
||||||
- make docker_build_arm
|
- make build_linux_arm
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
image: appleboy/golang-testing:1.9.2
|
image: appleboy/golang-testing:1.9.2
|
||||||
|
@ -96,6 +106,19 @@ pipeline:
|
||||||
event: [ push, tag ]
|
event: [ push, tag ]
|
||||||
local: false
|
local: false
|
||||||
|
|
||||||
|
publish_linux_i386:
|
||||||
|
image: plugins/docker
|
||||||
|
group: release
|
||||||
|
pull: true
|
||||||
|
dockerfile: Dockerfile.i386
|
||||||
|
secrets: [ docker_username, docker_password ]
|
||||||
|
default_tags: true
|
||||||
|
default_suffix: i386
|
||||||
|
repo: ${DRONE_REPO}
|
||||||
|
when:
|
||||||
|
event: [ push, tag ]
|
||||||
|
local: false
|
||||||
|
|
||||||
publish_linux_arm:
|
publish_linux_arm:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
group: release
|
group: release
|
||||||
|
|
|
@ -7,7 +7,7 @@ LABEL org.label-schema.vendor="Bo-Yi Wu"
|
||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||||
|
|
||||||
ADD bin/gorush /
|
ADD release/linux/amd64/gorush /bin/
|
||||||
|
|
||||||
EXPOSE 8088 9000
|
EXPOSE 8088 9000
|
||||||
ENTRYPOINT ["/gorush"]
|
ENTRYPOINT ["/bin/gorush"]
|
||||||
|
|
|
@ -10,7 +10,7 @@ LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||||
RUN apk add -U --no-cache ca-certificates && \
|
RUN apk add -U --no-cache ca-certificates && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
ADD bin/gorush /
|
ADD release/linux/amd64/gorush /bin/
|
||||||
|
|
||||||
EXPOSE 8088 9000
|
EXPOSE 8088 9000
|
||||||
ENTRYPOINT ["/gorush"]
|
ENTRYPOINT ["/bin/gorush"]
|
||||||
|
|
|
@ -7,7 +7,7 @@ LABEL org.label-schema.vendor="Bo-Yi Wu"
|
||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||||
|
|
||||||
ADD bin/gorush-arm /gorush
|
ADD release/linux/arm/gorush /bin/
|
||||||
|
|
||||||
EXPOSE 8088 9000
|
EXPOSE 8088 9000
|
||||||
ENTRYPOINT ["/gorush"]
|
ENTRYPOINT ["/bin/gorush"]
|
||||||
|
|
|
@ -7,7 +7,7 @@ LABEL org.label-schema.vendor="Bo-Yi Wu"
|
||||||
LABEL org.label-schema.schema-version="1.0"
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||||
|
|
||||||
ADD bin/gorush-arm64 /gorush
|
ADD release/linux/arm64/gorush /bin/
|
||||||
|
|
||||||
EXPOSE 8088 9000
|
EXPOSE 8088 9000
|
||||||
ENTRYPOINT ["/gorush"]
|
ENTRYPOINT ["/bin/gorush"]
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
FROM plugins/base:multiarch
|
||||||
|
|
||||||
|
LABEL org.label-schema.version=latest
|
||||||
|
LABEL org.label-schema.vcs-url="https://github.com/appleboy/gorush.git"
|
||||||
|
LABEL org.label-schema.name="Gorush"
|
||||||
|
LABEL org.label-schema.vendor="Bo-Yi Wu"
|
||||||
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
|
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||||
|
|
||||||
|
ADD release/linux/i386/gorush /bin/
|
||||||
|
|
||||||
|
EXPOSE 8088 9000
|
||||||
|
ENTRYPOINT ["/bin/gorush"]
|
15
Makefile
15
Makefile
|
@ -172,14 +172,17 @@ release-copy:
|
||||||
release-check:
|
release-check:
|
||||||
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
|
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
|
||||||
|
|
||||||
docker_build:
|
build_linux_amd64:
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/amd64/$(DEPLOY_IMAGE)
|
||||||
|
|
||||||
docker_build_arm64:
|
build_linux_i386:
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)-arm64
|
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/i386/$(DEPLOY_IMAGE)
|
||||||
|
|
||||||
docker_build_arm:
|
build_linux_arm64:
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)-arm
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/arm64/$(DEPLOY_IMAGE)
|
||||||
|
|
||||||
|
build_linux_arm:
|
||||||
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/arm/$(DEPLOY_IMAGE)
|
||||||
|
|
||||||
docker_image:
|
docker_image:
|
||||||
docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) -f Dockerfile .
|
docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) -f Dockerfile .
|
||||||
|
|
Loading…
Reference in New Issue