Search code examples
dockersystem

Cant start docker container


So basicly i copied this repo and i created my own( based on it )

Previously when i started commonsearch/elasticsearch container it worked perfecly, but after the copy outdream1337@elasticsearch container doesnt work any more. it produces no errors:

karlis@karlis-SATELLITE-L750 ~/Projects/search/cosr-back $ docker run -d -p 39200:9200 -p 39300:9300 outdream1337/local-elasticsearch
c2bc8fb75cb1df09ef4b87890fa1ec22760659aa4deed42c5f2cb89f3891bf60
dkarlis@karlis-SATELLITE-L750 ~/Projects/search/cosr-back $ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
karlis@karlis-SATELLITE-L750 ~/Projects/search/cosr-back $

and logs doesnt say anything ussfull too( because my other repo preduces same errors and everything works ):

time="2016-06-02T22:27:58.848821703+03:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers : [nameserver 8.8.8.8 nameserver 8.8.4.4]" 
time="2016-06-02T22:27:58.848865787+03:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers : [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"

ideas ?


Solution

  • You said you didn't change the image (based on reading the comments). So as far as I understand you want the same image on your own name in your own repository. Than your able to perform this: (this is what I did):

    docker pull commonsearch/local-elasticsearch:latest
    

    Tested the image:

    docker run -d -p 39200:9200 -p 39300:9300 commonsearch/local-elasticsearch:latest
    

    container is running, no errors:

    4c5bae680145        commonsearch/local-elasticsearch:latest   "/docker-entrypoint.s"   36 seconds ago      Up 35 seconds       0.0.0.0:39200->9200/tcp, 0.0.0.0:39300->9300/tcp   stoic_lalande
    

    Than you're able to tag the image on your own name:

    docker tag commonsearch/local-elasticsearch:latest outdream1337/local-elasticsearch:latest
    

    Test your image (which is actually just the same as the image of commonsearch). Don't forget to perform a docker rm -fv containerID on the container of commonsearch because this container is using the same ports as you want to use with your image:

    docker run -d -p 39200:9200 -p 39300:9300 outdream1337/local-elasticsearch:latest
    
    948a1361d99e        outdream1337/local-elasticsearch:latest   "/docker-entrypoint.s"   24 seconds ago       Up 23 seconds        0.0.0.0:39200->9200/tcp, 0.0.0.0:39300->9300/tcp   mad_kalam
    

    Container keeps running. No errors. so Login in into docker hub: docker login + credentials

    docker push outdream1337/local-elasticsearch:latest
    

    So now you have just the same image. Tagged on your own name in your own repository.