Skip to content

Commit

Permalink
Adding a Dockerfile and making it easy to use it for dev
Browse files Browse the repository at this point in the history
Credit goes to dperny (moby#2687)

**- What I did**

Adds a Dockerfile for the swarmkit project, to easily get off the ground. Modifies the Makefile to make intelligent use of Docker.

Also made small clean up changes to the Makefile.

**- How I did it**

Modifies the Makefile to have two paths: containerized.mk, which builds the docker image and forwards any make targets to a container, and direct.mk, which encompasses the old Makefile's workflow.

By default, nothing will run inside a container. Set the environment variable `DOCKER_SWARMKIT_USE_CONTAINER` to use dockerized making.

Also leverages docker-sync for synchronizing code to the container if the `DOCKER_SWARMKIT_USE_DOCKER_SYNC` env variable is set; comes in handy on Macs, for example.

**- How to test it**

Set `DOCKER_SWARMKIT_USE_CONTAINER` and verify that your favorite make targets all work!

Signed-off-by: Jean Rouge <jer329@cornell.edu>
  • Loading branch information
wk8 committed Sep 17, 2018
1 parent 50c60e7 commit bc0eadf
Show file tree
Hide file tree
Showing 5 changed files with 293 additions and 178 deletions.
33 changes: 24 additions & 9 deletions api/api.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,8 @@ file {
label: LABEL_OPTIONAL
type: TYPE_UINT32
options {
65003: "os.FileMode"
65001: 0
65003: "os.FileMode"
}
json_name: "mode"
}
Expand Down Expand Up @@ -2646,8 +2646,8 @@ file {
type: TYPE_MESSAGE
type_name: ".google.protobuf.Duration"
options {
65011: 1
65001: 0
65011: 1
}
json_name: "delay"
}
Expand Down Expand Up @@ -3090,8 +3090,8 @@ file {
}
}
options {
62023: "PublishMode"
62001: 0
62023: "PublishMode"
}
}
}
Expand Down Expand Up @@ -3790,8 +3790,8 @@ file {
label: LABEL_OPTIONAL
type: TYPE_UINT32
options {
65003: "os.FileMode"
65001: 0
65003: "os.FileMode"
}
json_name: "mode"
}
Expand Down Expand Up @@ -4207,8 +4207,8 @@ file {
}
}
options {
62023: "NodeRole"
62001: 0
62023: "NodeRole"
}
}
syntax: "proto3"
Expand Down Expand Up @@ -4876,6 +4876,21 @@ file {
type_name: ".docker.swarmkit.v1.ContainerSpec.SysctlsEntry"
json_name: "sysctls"
}
field {
name: "memory_swap"
number: 27
label: LABEL_OPTIONAL
type: TYPE_INT64
json_name: "memorySwap"
}
field {
name: "memory_swappiness"
number: 28
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".google.protobuf.Int64Value"
json_name: "memorySwappiness"
}
nested_type {
name: "LabelsEntry"
field {
Expand Down Expand Up @@ -8058,8 +8073,8 @@ file {
type: TYPE_MESSAGE
type_name: ".google.protobuf.Duration"
options {
65011: 1
65001: 0
65011: 1
}
json_name: "period"
}
Expand Down Expand Up @@ -9106,11 +9121,11 @@ file {
}
}
options {
63017: 1
63020: 1
63018: 1
63001: 0
63002: 0
63017: 1
63018: 1
63020: 1
}
}
file {
Expand Down
3 changes: 3 additions & 0 deletions api/deepcopy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func Copy(dst, src interface{}) {
case *types.BoolValue:
src := src.(*types.BoolValue)
*dst = *src
case *types.Int64Value:
src := src.(*types.Int64Value)
*dst = *src
case CopierFrom:
dst.CopyFrom(src)
default:
Expand Down
Loading

0 comments on commit bc0eadf

Please sign in to comment.