codacy.test.docker.DockerKitPrivilegedSpotify.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codacy-test-bench_2.13 Show documentation
Show all versions of codacy-test-bench_2.13 Show documentation
A library to send events on rabbit-mq
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)
}
}
}