Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    (docker-compose that is, and I set these up myself).
    Miko Suria
    hmm ok...
    I've been getting this "bad format for add-host" error everytime I try to create a container
    on docker for desktop (Mac)
    Well, no. There I can't really help. 100% linuxer here. no Mac, No windows. All linux workstations.
    Miko Suria
    thanks anyway :D

    Hi all, I have a very bad problem with docker and it made me mad. my Dockerfile can not read the .env file.

    my repo simulate it: https://github.com/nodejsdeveloperskh/docker/tree/docker-compose/docker-compose-files/mongodb-dockerfile-compose

    @all this i have hard times with docker. please help me :sob:

    Salathiel Genèse
    If you want .env from your host to your image, do COPY .env /path/to/target
    Or ADD .env /path/to/target
    If you have .env and rely on docker-compose for loading the .env file...
    First, note that you won't have them as ARG (i.e during image build), only at container run time

    If you have .env and rely on docker-compose for loading the .env file...

    I have it. but Dockerfile can not read the defined envs from it automatically.

    Salathiel Genèse
    Second, with Docker Compose, except you are using env_file option, you will have to map/substitute your environment variables manually...
        - ENV_VAR=${ENV_VAR}
    28 replies
    Last but not least, you may want to consider volumes... Even more so if you excluded .env in .dockerignore
    When having a .env file, you need to load its content into your shell/console-environment
    With JS (NodeJS) app, I use the env-cmd package from NPM
    Salathiel Genèse
    With C#/.NET, I use dotenv
    I don't use .env with Java as I most use Java with Spring which has has properties files and little different ways of handling conf
    But the idea is that
    Having a .env in your container won't automatically make its content available as environment variables
    Is your container UNIX-based ? Consider source .env in your entrypoint, before running your command to actually do the job
    Miguel Leite
    Hey all! quick question: I am trying to create a customized docker image from this dockerfile which is created from this one. In my own dockerfile, I want to override the python version that is installed.
    Shouldn't this suffice? What am I getting wrong?
    FROM jupyter/minimal-notebook:${PYTHON_VERSION}
    Hunter Morris
    Considering some immutable infrastructure with a Linux host running docker. Is it safe to persist /var/lib/docker somewhere and start with a fresh OS image and /var/lib/docker mounted from previous runs?
    heya, I changed my docker password (as special characters was messing with knative repo pull capability) but ever since none of my other images can pull.. I tried docker logout and then docker login. logs out and back in fine but still this error {{Warning Failed 9s (x2 over 23s) kubelet Failed to pull image "MYUSER/MYREPO:MYIMAGE": rpc error: code = Unknown desc = Error response from daemon: pull access denied for tesfra/test, repository does not exist or may require 'docker login': denied: requested access to the resource is denied}} however docker pull MYUSER/MYREPO:MYIMAGE works very confused any advice?
    Eduardo Reis Nobre
    Hi Guys,
    I'm setting up Laravel + Vue with nginx and everything on docker... 95% is working, the only thing left is the hot-reload portion that is run on a node container.
    I'm having trouble accessing the port 3000 that I've set up for my webserver.
    The port is bound correctly on my machine, It shows as being used, but the app.js and app.css files are not being served correctly.
    Could someone lend me a hand?
    9 replies
    Eduardo Reis Nobre
    Had some progress... The problem is that my node container only whats to serve the files if my host is
    Daniel Nordberg
    If someone gains root access to a server does that render docker secrets moot? How can I prevent someone with root access from entering a container and inspecting /run/secrets?
    5 replies
    hello guys, do you know any official phpunit docker image in the hub, I can't find one
    and if there is no official image then how to make one image of my own
    is there any guide for that?
    Mohit Sharma

    Hi guys, can any provide any support or comment on this? In my Jenkins, it fails intermittently

    unable to stream build output: failed to export image: failed to set parent sha256:c2c2a309ef34e311329b59de44153b7758d5d8f89812522d7aa64fa8edfc5432: unknown parent image ID sha256:c2c2a309ef34e311329b59de44153b7758d5d8f89812522d7aa64fa8edfc5432. Please fix the Dockerfile and try again..

    Any idea on this? Why it is happening?

    I've just mounted a compose with a front-end and back-end but it doesn't work when I open the front-end and this one tries to reach the back-end services through its name(s) since I'm in the host side.
    Hello you guys!
    I'm trying to push to my own harbor repository and the harbor returns:
    88e8e6c805e3: Layer already exists
    n2ff1e038d76: Retrying in 1 second
    n61d21fc5d7: Layer already exists
    zfa79a9eaf53: Layer already exists
    d42b1474ef7f: Layer already exists
    7df3a38066e2: Layer already exists
    ac276c40b172: Layer already exists
    received unexpected HTTP status: 500 Internal Server Error
    Matt Marsh


    I'm using Docker Compose to run a container and I'm wanting to use a named volume to retain some data between runs.

    However, in this case, the container runs as a non-root user and therefore it does not have permission to write data to the named volume, since that is owned by root.

    Is there some way that I can initialize the named volume (or mount it differently, or whatever else) so that it is owned by a different user? Or some other way to make this work?

    3 replies
    Tim Oien

    I'm running minikube and trying to run a headed browser inside of the container. I am able to run headless without an issue but then when I try to run a regular browser it says it start the capabilities, but then I get this error message Error: connect ECONNREFUSED

    [0-0] 2021-12-14T18:36:09.633Z INFO devtools:puppeteer: Initiate new session using the DevTools protocol
    [0-0] 2021-12-14T18:36:09.635Z INFO devtools: Launch Google Chrome with flags: --enable-automation --disable-popup-blocking --disable-extensions --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-first-run --no-default-browser-check --disable-hang-monitor --disable-prompt-on-repost --disable-client-side-phishing-detection --password-store=basic --use-mock-keychain --disable-component-extensions-with-background-pages --disable-breakpad --disable-dev-shm-usage --disable-ipc-flooding-protection --disable-renderer-backgrounding --force-fieldtrials=*BackgroundTracing/default/ --enable-features=NetworkService,NetworkServiceInProcess --disable-features=site-per-process,TranslateUI,BlinkGenPropertyTrees --window-position=0,0 --window-size=1200,900 --disable-infobars --window-size=1920,1080 --incognito --all
    [0-0] 2021-12-14T18:36:34.968Z ERROR @wdio/runner: Error: connect ECONNREFUSED
    [0-0]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)

    I do I connect my localhost to the container? I've ready you can do it via docker run --network="host", but I use minikube start to start docker and my container and run run the docker run command.

    Sai Prabhu
    any upcoming docker bootcamp
    Andrius Solopovas
    Hi Everyone I am having wierd error
    If I set /etc/resolv.conf nameserver: I can use curl to download the following package wget https://blackfire.io/api/v1/releases/probe/php/linux/x86_64/80
    but if I leave it on default like so /etc/resolv.conf nameserver: it says packages.blackfire.io host could not be resolved
    same happens with curl
    I tried settings manual dns to in docker desktop settings but with no success
    what could be the problem?
    If I download same url from Windows WSL works without any problems
    so the culprit must be docker
    tried resetting to factory defaults still fail with default nameserver
    Can someone help me?
    I am having an issue trying to docker build an API that uses Numpy and pandas