Skip to content

Commit

Permalink
Merge pull request #13 from wharfr/network-setting
Browse files Browse the repository at this point in the history
Network setting
  • Loading branch information
qur committed Sep 29, 2019
2 parents 06b29a8 + 83c44e2 commit a25adb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ default values (if the default is not empty):
| mount-home | bool | should /home be mounted into container |
| | | (default: true) |
+---------------+------------------+-------------------------------------------+
| network | string | the network to connect the container to |
+---------------+------------------+-------------------------------------------+
| ports | array of strings | ports to be exposed from container (-p |
| | | option to docker) |
+---------------+------------------+-------------------------------------------+
Expand Down
1 change: 1 addition & 0 deletions lib/config/crate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Crate struct {
Hostname string `toml:"hostname"`
Image string `toml:"image"`
MountHome bool `toml:"mount-home"`
Network string `toml:"network"`
Ports []string `toml:"ports"`
ProjectMount string `toml:"project-mount"`
SetupPost string `toml:"setup-post"`
Expand Down
1 change: 1 addition & 0 deletions lib/docker/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func (c *Connection) Create(crate *config.Crate) (string, error) {
DNS: []string{},
DNSSearch: []string{},
DNSOptions: []string{},
NetworkMode: container.NetworkMode(crate.Network),
}

networkingConfig := &network.NetworkingConfig{}
Expand Down

0 comments on commit a25adb5

Please sign in to comment.