feat: support windows build
This commit is contained in:
parent
9e53ba9917
commit
74f1e6573c
|
@ -24,14 +24,16 @@ install:
|
|||
build_script:
|
||||
- ps: |
|
||||
if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) {
|
||||
go build -ldflags "-X main.Version=$env:APPVEYOR_REPO_COMMIT -X main.BuildNum=$env:APPVEYOR_BUILD_VERSION" -a -o release/gorush.exe
|
||||
$version = $env:APPVEYOR_REPO_COMMIT
|
||||
$buildDate = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP
|
||||
} else {
|
||||
$version = $env:APPVEYOR_REPO_TAG_NAME
|
||||
go build -ldflags "-X main.Version=$version -X main.BuildNum=$env:APPVEYOR_BUILD_VERSION" -a -o release/gorush.exe
|
||||
$buildDate = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP
|
||||
}
|
||||
dir
|
||||
go build -ldflags "-X github.com/go-ggz/ggz/version.Version=$version -X github.com/go-ggz/ggz/version.BuildDate=$buildDate" -a -o release/ggz-server.exe .
|
||||
|
||||
docker pull microsoft/nanoserver:10.0.14393.1884
|
||||
docker build -f Dockerfile.windows -t appleboy/gorush:windows-amd64 .
|
||||
docker build -f docker/Dockerfile.windows.amd64 -t appleboy/gorush:windows-amd64 .
|
||||
|
||||
test_script:
|
||||
- ps: |
|
||||
|
|
|
@ -5,10 +5,10 @@ LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
|||
org.label-schema.vendor="Bo-Yi Wu" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
COPY release/gorush.exe /gorush.exe
|
||||
COPY release/gorush.exe C:/bin/gorush.exe
|
||||
|
||||
EXPOSE 8088 9000
|
||||
HEALTHCHECK --start-period=2s --interval=10s --timeout=5s \
|
||||
CMD ["\\gorush.exe", "--ping"]
|
||||
|
||||
ENTRYPOINT [ "\\gorush.exe" ]
|
||||
ENTRYPOINT [ "C:\\bin\\gorush.exe" ]
|
||||
|
|
Loading…
Reference in New Issue