Giter Site home page Giter Site logo

Comments (6)

noxiouz avatar noxiouz commented on July 3, 2024

Let's assume your containern named myapp and it's uploaded to otherregistry.host.net:5000.
The only thing you have to do is to upload manifest for your application to Cocaine storage (to let cocaine know about your app):

cocaine-tool app upload --name myapp --manifest manifets_for_your_app.json --manifest-only

The application must be started with a profile, where an isolation type is docker. Please, look to the second comment cocaine/cocaine-plugins#36

from cocaine-tools.

vitalyisaev2 avatar vitalyisaev2 commented on July 3, 2024

@noxiouz , thank you a lot! Works good, but with several restrictions.

When I try to load the image from the Registry that runs behind HTTPS proxy:

cocaine-tool app upload --name id-tool_test --manifest app/manifest.dnsdock.json --manifest-only
cocaine-tool start -n id-tool_test -r docker-test
{
    "id-tool_test": "Unable to create an image."
}

I get the following error:

 [Fri Jul 24 14:41:59 2015] [WARNING] app/id-tool_test: Unable to create an image. Docker replied with body: '{"status":"Pulling repository mailtest-4.dev.search.km/id-tool_test"}
{"errorDetail":{"message":"Authentication is required."},"error":"Authentication is required."}

However, when I pull the image manually, I can start the application:

docker pull mailtest-4.dev.search.km/id-tool_test
...
cocaine-tool start -n id-tool_test -r docker-test
{
    "id-tool_test": "the app has been started"
}

Please let me sure that I got this correctly: libcocaine-plugin-docker can't work with HTTPS Registry (taking into account that local Docker client is successfully authenticated into that Registry).

from cocaine-tools.

noxiouz avatar noxiouz commented on July 3, 2024

libcocaine-plugin-docker doesn't work with registry. It sends requets to a local Docker. Did you do docker login before pulling the image? Could you show me the profile for your application.

from cocaine-tools.

vitalyisaev2 avatar vitalyisaev2 commented on July 3, 2024

Yes, I did docker login before the application start, after that I got '.dockercfg' file (see below):

$ cat docker-registry 
{
    "queue-limit": 1000,
    "pool-limit": 10,
    "isolate": {
        "type": "docker",
        "args": {
            "memory_limit": 100000000,
            "endpoint": "unix:///var/run/docker.sock",
            "registry": "mailtest-4.dev.search.km",
            "cpu_shares": 0
        }
    },
    "log-output": true,
    "concurrency": 200
}
$ cat ~/.dockercfg 
{
    "mailtest-4.dev.search.km": {
        "auth": "SOME_HASH_HERE",
        "email": ""
    }
}

Alll together again:

$ cocaine-tool app upload -n id-tool_test2 --manifest app/manifest.dnsdock.json --manifest-only
Setting timeout to the 120.000000s
[  OK  ] Loading manifest
[  OK  ] Uploading manifest
$ cocaine-tool app start -n id-tool_test2 -r docker-registry 
{
    "id-tool_test2": "Unable to create an image."
}
$ docker pull mailtest-4.dev.search.km/id-tool_test2
Pulling repository mailtest-4.dev.search.km/id-tool_test2
f26a3d9aa657: Download complete 
c87d97ed7d49: Download complete 
3ed890b0e33e: Download complete 
e9938c931006: Download complete 
ab57dbafeeea: Download complete 
66f7ddd64696: Download complete 
8e0bd56abc95: Download complete 
985f8a18afe4: Download complete 
4f0db51fe467: Download complete 
242b505f6897: Download complete 
d87d6da7d9d1: Download complete 
6121f0e2586e: Download complete 
bc64481022de: Download complete 
bde80e152ac5: Download complete 
Status: Downloaded newer image for mailtest-4.dev.search.km/id-tool_test2:latest
$ cocaine-tool app start -n id-tool_test2 -r docker-registry
{
    "id-tool_test2": "the app has been started"
}

from cocaine-tools.

noxiouz avatar noxiouz commented on July 3, 2024

Yes, the plugin doesn't support authorization for spooling a container. I'll investigate the issue

from cocaine-tools.

vitalyisaev2 avatar vitalyisaev2 commented on July 3, 2024

I really appreciate it!

from cocaine-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.