Comments (8)
Looks like the Spotify Docker API has OSX socket support covered. Maybe switch to that lib?
from docker-it-scala.
Thanks @dlouwers
I put config variables into README section. Works for me that way as well
from docker-it-scala.
Cant get this working even with this work around
Is there anything else I could try?
info] DeferredAbortedSuite: [info] Exception encountered when attempting to run a suite with class name: org.scalatest.DeferredAbortedSuite *** ABORTED *** [info] java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl [info] at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:122) [info] at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91) [info] at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69) [info] at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80) [info] at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:99) [info] at org.glassfish.jersey.client.JerseyWebTarget.<init>(JerseyWebTarget.java:71) [info] at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:185) [info] at org.glassfish.jersey.client.JerseyClient.target(JerseyClient.java:70) [info] at com.github.dockerjava.jaxrs.DockerCmdExecFactoryImpl.init(DockerCmdExecFactoryImpl.java:214) [info] at com.github.dockerjava.core.DockerClientImpl.withDockerCmdExecFactory(DockerClientImpl.java:159) [info] ... [info] Cause: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl [info] at java.net.URLClassLoader$1.run(URLClassLoader.java:372) [info] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [info] at java.security.AccessController.doPrivileged(Native Method) [info] at java.net.URLClassLoader.findClass(URLClassLoader.java:360) [info] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [info] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) [info] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [info] at java.lang.Class.forName0(Native Method) [info] at java.lang.Class.forName(Class.java:259) [info] at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:62) [info] ...
I have exported the envirnment variables but when I do
docker-machine env
These do not seem to have been set. I am using the ZSH shell, could this be an issue?
docker-machine env export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/ciaran/.docker/machine/machines/default" export DOCKER_MACHINE_NAME="default"
from docker-it-scala.
@Ciaran0 Using docker-machine implies that you are not using the native OSX docker beta.
Unfortunately this http interface has been removed in the latest version. I am now trying to make it work using socat:
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock &
export DOCKER_HOST=tcp://localhost:2375
unset DOCKER_TLS_VERIFY
Will have to combine this with the Netty DockerCmdExecFactory
in order to get this workaround to work apparently. Ultimately there should be better Java socket file support on OSX though. Other languages like Go or Python are not having issues at all.
from docker-it-scala.
Ideally, we'd like to make implementation configurable if we go that way. I'm not vary familiar with spotify client and don't know it's strengths/weaknesses.
Unfortunately it is quite unlikely that I can look into it this week. Personally rolling back my machine to boot2docker temporarily :(
from docker-it-scala.
Can now confirm a workaround:
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock &
export DOCKER_HOST=tcp://localhost:2375
unset DOCKER_TLS_VERIFY
And then use this alternative Docker implementation:
class Docker(override val config: DockerClientConfig) extends com.whisk.docker.Docker(config) {
override val client = DockerClientBuilder.getInstance(config).withDockerCmdExecFactory(new com.github.dockerjava.netty.DockerCmdExecFactoryImpl).build()
override val host = config.getDockerHost.getHost
}
Can confirm that this works, though it can hardly be called secure running over plain http.
from docker-it-scala.
I think this can be closed, the README shows how to use this lib using the Spotify docker client which works both on mac / linux (win?)
override implicit val dockerFactory: DockerFactory = new SpotifyDockerFactory(DefaultDockerClient.fromEnv().build())
from docker-it-scala.
Yep, agree. Closing
from docker-it-scala.
Related Issues (20)
- Missing support for running container in privileged mode HOT 1
- Concurrency issues on logs
- No support for UDP?
- Timeout or Race condition resulting in Cannot run all required containers HOT 1
- Shutdown connection before running tests HOT 1
- Pulling image timeout gives an error message about not being able to pull windows image
- Publish v0.9.7 for 2.11 ? HOT 1
- Plans to publish a jar with shaded spotify docker-client? HOT 8
- Setup steps unclear HOT 2
- PostgresServiceSpec fails with driver libraries from 42 HOT 1
- Allow pausing/unpausing of containers in DockerExecutor
- Release for Scala 2.13 HOT 5
- run unpublished docker image with whisk labs docker-it-scala HOT 1
- Incompatible with ScalaTest's AsyncTestSuite
- Issues with SBT 1.3.x
- An image without a tag pulls all tags
- Persisting container across multiple test classes
- withUnlinkedDependencies not starting dependent container
- DockerContainer should have an option to configure withIpv6Address and withExtraHosts
- Missing release for docker-testkit-impl-docker-java 0.11.0 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-it-scala.