Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Peter Delvaux
    @pjetr
    I was thinking of putting that in my command in the docker-compose.yml
    but I could create a basic script
    and execute that as command
    Marko initer Shiva Pavlovic
    @in1t3r
    yep
    Peter Delvaux
    @pjetr
    in which I do that checking!
    thanks man!
    Marko initer Shiva Pavlovic
    @in1t3r
    np you solved it yourself :)
    Peter Delvaux
    @pjetr
    Yay, that works!
    such a simple solution, ...
    KISS, amirite :joy:
    Ankit Kumar
    @ankitsharma07
    Hi!
    I have a Deep Learning application which I have been serving on EC2. Now I want to containerize it using docker and then transfer it to ECS
    My question is basically if and how I can make use of open source libraries inside a docker container and how to use it in our main program?
    Say exampleOpen is an open source library and I made a container using Dockerfile now how can I import this into my main program?
    any help would be appreciated
    Marko initer Shiva Pavlovic
    @in1t3r
    ok so the question is how to use containerized oss libs in the project?
    Well then you would need to write an app and put it in the container or into docker-compose and start them. Have you read about docker? Do you understand usage? @ankitsharma07
    You cannot import into main program main program need to run inside of the docker container you can have it running in the same container as the libraries or you can have libraries be used as services if they can interact with your program externally over the network they then can communicate with a program inside of docker compose too. :)
    Ankit Kumar
    @ankitsharma07
    @in1t3r I read somewhere that docker images are immutable. My program is in CD stage. So, I wanted to make images for my external modules only.
    Marko initer Shiva Pavlovic
    @in1t3r
    Well that depends how you make the image. The base of the image might be immutable but all of the data that is processed durring the execution of the image can still be accessible if vou leave mounts as volumes and on that way it could be latter accessed and used.
    matrixbot
    @matrixbot
    Draget I am wondering: Is there an actual security advantage running processes inside a docker container as a limited user and not as root, assuming I do not use mounts? If I do not mount anything from my host (or only mount an irrelevant directory), does running the process inside the container as a non-root user harden anything?

    Draget I know there have been bugs in namespaces in the past where one could break out of the container, but these have been fixed. And kernel exploits can always happen.

    On the other hand, handling PIDs and permissions is kind of a PITA when limiting a process inside a container.

    Ankit Kumar
    @ankitsharma07
    I am installing one module using dockerfile and that requires command line interaction to select Yes/No. How to deal with this?
    Is there a way where we can RUN apt-install moduleName and for interaction keep to always Yes so that the docker build is not interrupted.
    epifanio
    @epifanio
    Hi @All, I am looking for some advise/help in using docker contaieners .. is this the righ channel?
    epifanio
    @epifanio

    I currently run a series of services using docker, the services are all starting using docker-compose, the compose file looks like: https://gist.github.com/epifanio/6617bd97c421c067841e6f785d353dea

    the service "pydap" is serving a resource using an network protocol (opedap) and this resource is avaialble on localhost:80 from my host network. I can access it in python from a standard shell with this code:

    from pydap.client import open_url
    dataset = open_url('http://localhost/SN99938.nc')

    my problem is:

    • the 'jupyter' service (running on localhost:8888) which is a python notebook server, is not able toreach such resource ... how to tell the jupyter service to load the resource served by an other container?
    ecaepp
    @ecaepp
    @epifanio Are you able to connect to the Jupyter service from your host machine?
    epifanio
    @epifanio
    @ecaepp yes, I can load the notebook into my browser using 'localhost:port’
    ecaepp
    @ecaepp
    hmmm
    @epifanio have you checked the logs for the service docker-compose logs <service_name>?
    epifanio
    @epifanio
    no i didn’t - I was checking from the shell where I started the docker-compose up , it seemed everything works as expected
    Mean, If i load one of the docker services started with docker-compose I can access all of them on localhost with my browser
    But if i use “localhost:port” in a code-cell of the notebook, it can’t find the service which docker-compose started ….
    I guess the notebook “localhost” refers to the docker-image running the jupyter server and doesn’t know about the outside docker istances
    I was trying to read about docker networks, bridge etc ..

    perhapse in the notebook code cell i should use instead of:

    from pydap.client import open_url
    dataset = open_url('http://localhost/SN99938.nc')

    The container_name of the docker image? the one assigned in the docker-compose.yml file?

    from pydap.client import open_url
    dataset = open_url('http://metsis_pydap/SN99938.nc’)
    ecaepp
    @ecaepp
    @epifanio Ahh yes, you are correct in your code use the service name you are trying to connect to. Docker runs it's own DNS so it will be able to resolve the service name to the container you need to connect to.
    epifanio
    @epifanio
    I will be able to test it tomorrow first thing in the morning :)
    @ecaepp thanks!
    guddutopper
    @guddutopper

    I have a Java Docker container C1, I am creating multiple docker containers inside my program logic and connecting them to docker networks, I also join container C1 to some of these docker networks. The entire program logic is running in a single thread. Now a weird thing is happening, If I try to join container C1 to any of the external docker networks, I get a socket timeout exception (The container C1 joins the external network, I can see this using docker inspect but my thread just keeps on waiting).

    but if I join C1 to internal docker networks everything works fine. Please note that this only happens with container C1 (in which the program logic is executing), all other containers which are created in my program logic are able to join external/internal networks without any exception.

    I have tried increasing the read timeout and connection timeout of Docker Client to much higher values than the default ones but I still get the same error.

    I was using spotify Docker client, I also tried using Docker-Java client, I also tried changing my docker versions but nothing is working so far.

    Java version - 11.0.2

    Docker version - 18.9.3

    rajkiranguvvala
    @rajkiranguvvala
    @combiz_k_twitter i would suggest to use multi stage build
    Samuel Joli
    @Samueljoli
    is there anyway to run docker-compose up and publish the ports to my host machine
    Can't seem to be able to hit my api using localhost
    rajkiranguvvala
    @rajkiranguvvala
    @guddutopper , what kind of program is your logic sits in?
    guddutopper
    @guddutopper
    @rajkiranguvvala Its a java rest API from a web interface, the logic is to just create container and join them to networks
    guddutopper
    @guddutopper

    @rajkiranguvvala here is the logs of a newly instantiated container when it tries to join a external net

    07:14:23.300 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 >> "{"Container":"cd2b48968a638f84c23d6705f692e519c406b0cfdcaa8071de69d87d4b854691","EndpointConfig":{"IPAMConfig":{"IPv4Address":"192.168.3.3"},"Aliases":[],"Gateway":"192.168.3.1","IPAddress":"192.168.3.3"}}[\r][\n]"
    
    07:14:23.300 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 >> "0[\r][\n]"
    
    07:14:23.300 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 >> "[\r][\n]"
    
    07:14:25.144 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 << "HTTP/1.1 200 OK[\r][\n]"
    
    07:14:25.144 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 << "Api-Version: 1.38[\r][\n]"
    
    07:14:25.144 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 << "Docker-Experimental: false[\r][\n]"
    
    07:14:25.144 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 << "Ostype: linux[\r][\n]"
    
    07:14:25.144 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-23 << "Server: Docker/18.06.3-ce (linux)[\r][\n]"

    you can see that i am getting an OK response , now look at the logs when the original container C1 joins an external network

    07:14:25.428 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-27 >> "{"Container":"container_56282aed-72ae-4658-a606-27876870d2f1","EndpointConfig":{"IPAMConfig":{"IPv4Address":"192.168.2.3"},"Aliases":[],"Gateway":"192.168.2.1","IPAddress":"192.168.2.3"}}[\r][\n]"
    
    07:14:25.428 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-27 >> "0[\r][\n]"
    
    07:14:25.428 [jersey-client-async-executor-0] DEBUG org.apache.http.wire - http-outgoing-27 >> "[\r][\n]"

    It keeps on waiting after the last log entry,
    Idk why this is happening ?

    rajkiranguvvala
    @rajkiranguvvala
    @guddutopper can you try restarting all containers, sometimes DNS on docker will resolve the network issues if any?
    cmd prmt-------service docker restart
    rajkiranguvvala
    @rajkiranguvvala
    if you can share the command on how you are running the container in your program that might give a bit of background?
    any what type of networks are you creating and connecting your containers?
    Niels Pedersen
    @nielspedersen

    Hey guys. I’m trying to install h5py with pip in a docker image:

    FROM circleci/python:3.7
    RUN sudo pip install h5py==2.8.0

    This fails, but only with the circleci as base. If I try with FROM python:3.7 it works just fine.

    The error message is related to gcc, but other than that I’m at a loss. Anyone have any idea what I can try to debug the problem further and find the cause?

    ecaepp
    @ecaepp
    @nielspedersen I was unable to reproduce the the issue. I made a Dockerfile with those couple of lines and it completed aith no errors.
    guddutopper
    @guddutopper

    @guddutopper can you try restarting all containers, sometimes DNS on docker will resolve the network issues if any?
    cmd prmt-------service docker restart

    @rajkiranguvvala I have tested this atleast 20-30 times, this issue always occurs

    Niels Pedersen
    @nielspedersen
    @ecaepp Thank you for testing it also. I can now also run this locally without problems. But the issue remains when running this on CircleCI as a job. I’ve reached out to CircleCI support instead :) Thanks