Giter VIP home page Giter VIP logo

Comments (6)

brikis98 avatar brikis98 commented on June 3, 2024

Could you run the following command and paste the output:

env | grep DOCKER

Background info:

  1. One of the steps for installing boot2docker is to add a bunch of environment variables, including DOCKER_CERT_PATH and DOCKER_TLS_VERIFY. These are the result of the boot2docker shellinit command. Make sure you are not setting these in ~/.bash_profile or ~/.bash_rc. If they are already set in your current shell, try to explicitly run unset DOCKER_CERT_PATH DOCKER_TLS_VERIFY.
  2. The only Docker-related environment variable you should have set is DOCKER_HOST. When you run the setup.sh script of docker-osx-dev, it adds this setting automatically to ~/.bash_profile or ~/.bash_rc, but there is no way to modify your existing shell, so you have to run source ~/.bash_profile to pick up the changes.

from docker-osx-dev.

ruprict avatar ruprict commented on June 3, 2024

I ran that command as a part of the issue description above. I have no DOCKER env vars set in the session.

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 3, 2024

OK, you need DOCKER_HOST to be set:

export DOCKER_HOST=tcp://localhost:2375

That should be in ~/.bash_profile or ~/.bashrc as well.

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 3, 2024

BTW, the setup.sh tries to be idempotent and not break existing installs. This includes checking your ~/.bash_profile and ~/.bashrc files and if DOCKER_HOST is already set, setup.sh does NOT overwrite it (it just logs a warning). Since you had boot2docker installed, I'm guessing it didn't add the new value, so you have to do it by hand.

from docker-osx-dev.

ruprict avatar ruprict commented on June 3, 2024

So, setting DOCKER_HOST definitely got me further. docker-compose builds, but now docker-compose up seems to run the CMD (which is rails s) in the wrong directory. This Dockerfile was working fine, and I haven't changed it, but I am not sure if it's related or even how it could be. One of the first things the rails s command ends up doing is Bundler.setup, which errors out now saying it can't find the Gemfile, but it's there (running a docker run image /bin/bash on the same image starts in the right /app dir and the Gemfile is there)

I am still trying to figure this out, but in the off chance you have a suggestion.....

Thanks for the help, btw.

UPDATE: So, it is in the right /app dir, but it's not adding the code to it when docker-compose is run. However, if I docker run the same CMD on the EXACT image built by docker-compose, the code is there. It's so odd.

MOAR UPDATE: If I switch back to boot2docker, run docker-compose build and docker-compose up, everything works. Somehow, docker-osx-dev is not mapping the volume for the current dir.

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 3, 2024

Good to hear. I just updated the README with some clarification about already having boot2docker installed and am going to close this issue.

Could you file a separate issue for this latest bug you're hitting? I'd need more details about your directory structure and the contents of your docker-compose.yml file.

from docker-osx-dev.

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.