Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Adds Docker plugin build script for Windows [SKIP CI] #1565

Merged

Conversation

venilnoronha
Copy link
Contributor

@venilnoronha venilnoronha commented Jul 8, 2017

Description

This PR adds build.bat which creates the vsphere.json config file under the Docker plugin config directory, and builds the plugin binaries i.e. vmci_client.dll and vdvs.exe.

Fixes #1558.

Build Instructions

The plugin can be built on Windows 2016 Server and Windows 10 Pro/Enterprise/Education (anniversary release) VMs.

Dependencies

  1. Golang
  2. MSVC Build Tools 2017
  3. mingw-w64 for gcc, which is required for CGO in Go.

Building

  1. Start cmd and cd to the docker-volume-vsphere directory.
  2. Execute build.bat.

Output

The script generates vmci_client.dll and vdvs.exe under the docker-volume-vsphere\build\windows directory.

Usage

  1. Run vdvs.exe.
  2. Execute Docker commands like docker volume create --driver=vsphere volName.

Script Output

C:\Users\Administrator\go\src\github.com\vmware\docker-volume-vsphere>build.bat
Found Go.
Found Microsoft Visual C++ Build Tools.
Cleaning up.
Clean up complete.
Building vDVS...
Entering the MSVC Build Tools environment.
Entering the vmci source directory.
Compiling vmci_client.dll.
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

vmci_client.c
vmci_client.c(143): warning C4133: 'function': incompatible types - from 'FILE *' to 'const char *const '
vmci_client.c(227): warning C4133: 'function': incompatible types - from 'uint32_t *' to 'const char *'
vmci_client.c(233): warning C4133: 'function': incompatible types - from 'uint32_t *' to 'const char *'
vmci_client.c(248): warning C4133: 'function': incompatible types - from 'uint32_t *' to 'char *'
vmci_client.c(262): warning C4133: 'function': incompatible types - from 'uint32_t *' to 'char *'
vmci_client.c(251): warning C4477: 'snprintf' : format string '%d' requires an argument of type 'int', but variadic argument 2 has type 'std::size_t'
vmci_client.c(251): note: consider using '%zd' in the format string
Microsoft (R) Incremental Linker Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:vmci_client.exe
/defaultlib:ws2_32.lib
/DLL
/OUT:vmci_client.dll
/DEF:vmci_client.def
vmci_client.obj
   Creating library vmci_client.lib and object vmci_client.exp
Compiled vmci_client.dll successfully.
Moving vmci_client.dll to the plugin directory.
        1 file(s) moved.
Successfully moved vmci_client.dll to the plugin directory.
Entering the refcount directory.
Removing refcnt.go build tag.
Successfully removed refcnt.go build tag.
Entering the plugin directory.
Building vdvs.exe.
github.com/vmware/docker-volume-vsphere/vendor/github.com/Microsoft/go-winio
github.com/vmware/docker-volume-vsphere/vendor/github.com/Sirupsen/logrus
github.com/vmware/docker-volume-vsphere/vendor/golang.org/x/net/proxy
github.com/vmware/docker-volume-vsphere/vendor/github.com/natefinch/lumberjack
github.com/vmware/docker-volume-vsphere/vmdk_plugin/drivers
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/distribution/digest
github.com/vmware/docker-volume-vsphere/vendor/golang.org/x/net/context
github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/fs
github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/plugin_utils
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/distribution/reference
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/go-connections/sockets
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/blkiodev
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/strslice
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/go-connections/nat
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/go-units
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/versions
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/go-plugins-helpers/sdk
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/client/transport
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/filters
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/container
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/network
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/client/transport/cancellable
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/go-plugins-helpers/volume
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/registry
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/swarm
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/reference
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types/time
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/go-connections/tlsconfig
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/types
github.com/vmware/docker-volume-vsphere/vendor/github.com/vmware/photon-controller-go-sdk/photon/lightwave
github.com/vmware/docker-volume-vsphere/vmdk_plugin/drivers/vmdk/vmdkops
github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/config
github.com/vmware/docker-volume-vsphere/vendor/github.com/vmware/photon-controller-go-sdk/photon
github.com/vmware/docker-volume-vsphere/vendor/github.com/docker/engine-api/client
github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/refcount
github.com/vmware/docker-volume-vsphere/vmdk_plugin/drivers/photon
github.com/vmware/docker-volume-vsphere/vmdk_plugin/drivers/vmdk
command-line-arguments
Successfully built vdvs.exe.
Writing vsphere.json to the docker plugin config directory.
Successfully wrote vsphere.json to the docker plugin config directory.
Moving binaries to the build directory.
        1 file(s) moved.
        1 file(s) moved.
Successfully moved binaries to the build directory.
vDVS build complete.
Binaries are available under C:\Users\Administrator\go\src\github.com\vmware\docker-volume-vsphere\build\windows.

This commit adds build.bat which creates the vsphere.json config file
under the Docker plugin config directory, and builds the plugin
binaries i.e. vmci_client.dll and vdvs.exe.
Copy link
Contributor

@msterin msterin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT.

One small comment-only request though. Can you add the build instructions from the description (the ones below) to the scripts as comments?

thanks

these ones:
copy-n-pasted from Description:

Build Instructions

The plugin can be built on Windows 2016 Server and Windows 10 Pro/Enterprise/Education (anniversary release) VMs.
Dependencies

    Golang
    MSVC Build Tools 2017
    mingw-w64 for gcc, which is required for CGO in Go.

Building

    Start cmd and cd to the docker-volume-vsphere directory.
    Execute build.bat.

@venilnoronha
Copy link
Contributor Author

@msterin addressed your comment in 0af18bc.

@venilnoronha venilnoronha force-pushed the windows-build.venilnoronha branch from 6e230d0 to 91617c0 Compare July 10, 2017 16:38
Copy link
Contributor

@shaominchen shaominchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Cool PR indeed:)

Copy link
Contributor

@pshahzeb pshahzeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@venilnoronha venilnoronha merged commit c669a07 into vmware-archive:master Jul 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants