Im trying to install the official go docker client by importing
"github.com/docker/docker/client"
But i get the following error
cannot load github.com/docker/distribution/reference: cannot find module providing package github.com/docker/distribution/reference
My go version is 1.12 and
my project is outside $GOPATH/src. My go.mod file looks like this.
module app
go 1.12
require (
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/docker/docker v1.13.1
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect
)
I remember that I had similar problems as you 1.5-2 monthes ago.
My observations:
there are a lot of versions of docker API
it's hard to tell which version described in "official" documentation
API itself flawed
source code - quite easy to understand
I did not found answers for "what actually describes official documentation?" or "where actually docker API repo?"
I gave up on attempts to solve in "official way" and found that more practical to use "unofficial"
"Unofficial way":
use docker/docker-ce (note that examples from official documentation will not work without modification)
instead of official documentation - just search code in docker-ce repo.
best example of docker/client usage I found here: components/engine/integration/internal/container/exec.go (note that it resides in internal and is impossible to be used as package)
I grabbed code that I needed into my package and solved the problem I had
Maybe it's "incorrect" solution but it worked for me.
I suppose it could be more practical for you to not rely on docker documentation too.
Good luck!
Based on docker documentation, it says that you have to execute go get github.com/docker/docker/client command to download it. Once library is retrieved it should compile.
Related
I tried searching docker hub to find for antlr4 Images. As far I know, we don't have any official image as of now for antlr on dockerhub. Does anyone know, which is most suitable and standard image, preferable for JavaScript Parser related works?
I saw couple of image suggestions with individual account, but not sure which is reliable and robust enough.
Please don't suggest the general suggestions like, one with most downloads etc. is better. Please suggest if you have used or any other valid point you have.
ANTLR has a repo for docker image on Github:
This Docker image wraps current version of ANTLR4 inclusive Java
runtime environment so it can be executed as transparent command line
tool even on machines without installed Java.
https://github.com/antlr/antlr4/tree/master/docker
I am getting the error:
Failed to define class org.tensorflow.framework.DataType
I looked through the latest jars for Deeplearning4j and can not find it. Do I need to download from Maven the Tensorflow jars? I am running the new Deeplearning4j framework inside a j2ee Wildfly server for a web service using java 1.8.
Thanks!
Ok, I figured out where it is located. I downloaded the nd4j-tensor-1.0.0-beta4 jar and error went away.
-Tony
Deeplearning4j maintainer here. Cobbling together dependencies is always a bad idea:
Few things:
beta4 is decently old at this point and I would not recommend using it.
I'm guessing you're likely mixing versions. If you are, please don't. Always use the same version. The whole dl4j stack will always have the same versions and if different versions work together it's because you're lucky. It's not deliberate.
Generally try to use maven/gradle where possible for resolving dependencies. There's lots of small jars that can be mixed/matched.
Apologies for the noob question; I am new to using DC/OS (using v1.8.7) and have learnt that DC/OS has Marathon built in (Source: https://docs.mesosphere.com/1.8/administration/release-notes/).
When I go to the 'Universe' browser in DC/OS, I find that I can download and install the Marathon (v1.3.3) package.
Is this package now redundant for the version of DC/OS that I am using?
Why would I use the Marathon package in DC/OS - what features does it give to me that I don't already get from DC/OS?
I'm basically fumbling through setting up my first cluster and trying to learn as I go along, so I would appreciate any insight!
I have also posted the same question here: https://unix.stackexchange.com/questions/325103/what-benefits-does-the-marathon-package-bring-to-dc-os - but this forum doesn't seem to be any where near as active as StackOverflow; If i get an answer here, I will delete the other question or vice-versa.
Great question, happy to provide some clarification since I think we don't do a great job explaining this.
Is this package now redundant for the version of DC/OS that I am using?
No. The use case for this package (called Marathon-on-Marathon or MoM for short) is to give users a user-land supervisor. You don't want to share the System Marathon with your users and allow everyone to install stuff from the Universe? OK, no problem, install a MoM for each of your users/teams/projects and they can do whatever they like within it (for example, install Jenkins, Spark, etc.)
Why would I use the Marathon package in DC/OS - what features does it give to me that I don't already get from DC/OS?
See above. No additional feature (there are even some limitations, that is, there's stuff you can do on the System Marathon you can't do in MoM) but think of it as a multi-tenant and/or security feature (well, a poor-man's, really—the Mesosphere DC/OS Enterprise Edition provides a full-featured environment like authn/authz, ACLs, secrets, etc.).
I've seen some documentation saying it was possible to use ant tasks to generate worklight builds.
That documentation tells me that to use that feature I must find a worklight-ant.jar.
That is my problem, I don't find that jar anywhere. Not on my worklight studio installation nor in my (another) worklight server running on a WAS Liberty profile.
I've found on that server something close, I've found a worklight-ant-builder.jar and a worklight-ant-deployer.jar.
Unfortunately that doesn't have some classes required for the build, like com.ibm.team.build.ant.task.ArtifactFilePublisherTask.
Another good point was that I've found on my server the applicationcenterdeploytool.jar: from /ApplicationCenter/tools and the json4j.jar from /ApplicationCenter/tools.
I'm using WL6.2.
What am I missing? Can anyone help me please?
worklight-ant.jar is now delivered as part of the Worklight CLI installation. Download the CLI here (Download button > CLI):
http://www.ibm.com/developerworks/mobile/worklight
Once the CLI has been installed, you can find the worklight-ant-builder.jar file in the installation directory/public dir. For example, in OSX, the default location is:
/Applications/IBM/Worklight-CLI/public/worklight-ant-builder.jar
Hope this helps.
The documentation I was using at the time of that post was out of date.
The updated documentation is here:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fdevref%2Fr_ant_tasks_for_building_and_dep.html
On my comments there is a reference for a post that explains the correct way to call the ant to build the worklight.
I'm starting a development with contiki and STM32F4discovery.
I found a fork of contiki for STM32F4discovery from jensnielsen on github.
I've downloaded it and try to make for the TARGET STM32F4discovery using
make TARGET=stmf4discovery hello-world
The makefile just compile hellow-world.c and then fail when it try to link the project because it doesn't find the reference of contiki core, sys, etc.
I try to make the hello-world in native and it works find.
What do I have to do to make the target?
Best regards,
Pascal
This is a very narrow question on my personal code, you should probably have asked me directly rather than stack overflow...
But anyway, the answer to the question is that my port is incomplete and broken, you should go for another fork (perhaps https://github.com/ptasz3k/contiki-stm32f4discovery)