add oci port mapping of registery

pull/7603/head
Alonyb 2020-04-10 08:20:12 -05:00
parent e785012525
commit 50c2ec4eaf
1 changed files with 15 additions and 0 deletions

View File

@ -93,8 +93,14 @@ func (d *Driver) Create() error {
ListenAddress: oci.DefaultBindIPV4,
ContainerPort: constants.DockerDaemonPort,
},
oci.PortMapping{
ListenAddress: oci.DefaultBindIPV4,
ContainerPort: constants.RegisteryAddonPort,
},
)
fmt.Println("ruben")
exists, err := oci.ContainerExists(d.OCIBinary, params.Name)
if err != nil {
glog.Warningf("failed to check if container already exists: %v", err)
@ -203,6 +209,15 @@ func (d *Driver) GetSSHPort() (int, error) {
return p, nil
}
//// GetRegisteryAddonPort returns port for use with ssh
//func (d *Driver) GetRegisteryAddonPort() (int, error) {
// p, err := oci.ForwardedPort(d.OCIBinary, d.MachineName, constants.RegisteryAddonPort)
// if err != nil {
// return p, errors.Wrap(err, "get ssh host-port")
// }
// return p, nil
//}
// GetSSHUsername returns the ssh username
func (d *Driver) GetSSHUsername() string {
return "docker"