All Downloads are FREE. Search and download functionalities are using the official Maven repository.

codacy.test.docker.DockerKitPrivilegedSpotify.scala Maven / Gradle / Ivy

The newest version!
package codacy.test.docker

import codacy.test.docker.impl.PrivilegedSpotifyDockerCommandExecutor
import com.spotify.docker.client.{DefaultDockerClient, DockerClient}
import com.whisk.docker.{DockerCommandExecutor, DockerFactory, DockerKit}

/**
  * This trait replaces [[com.whisk.docker.impl.spotify.DockerKitSpotify]]
  * and allows containers to run in privileged mode
  */
trait DockerKitPrivilegedSpotify extends DockerKit {

  override implicit val dockerFactory: DockerFactory =
    new PrivilegedSpotifyDockerFactory(DefaultDockerClient.fromEnv().build())

  private class PrivilegedSpotifyDockerFactory(client: DockerClient) extends DockerFactory {
    override def createExecutor(): DockerCommandExecutor = {
      new PrivilegedSpotifyDockerCommandExecutor(client.getHost, client)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy