Coder Social home page Coder Social logo

Comments (5)

Lukenickerson avatar Lukenickerson commented on May 1, 2024

Work-around is to add nodejs-npm to the list of things to install with apk. Not sure what was updated recently that breaks this automatic dependency (apk? node?).

A good long-term solution might be to have tagged versions for the docker-with-compose image, so that we don't have to always use "latest".

from docker-with-compose.

tiangolo avatar tiangolo commented on May 1, 2024

So, this image is automatically re-built based on the official Docker image, and the builds are triggered automatically whenever there's a new image of the official Docker image (Docker-ception) and also whenever there's a new image of the official Docker Compose image.

So, I guess the latest official "Docker" image has that behavior.


Now, about your specific problem, I'm intrigued about it and what you are doing or trying to achieve.

When I first made this image, I did it to solve a simple problem, to just start other containers in Docker, using Docker Compose, from inside a container. To run stuff in CI systems that had Docker (in my case, GitLab CI).

What I normally do is:

  • Build a stack with: docker-compose -f docker-compose.yml -f docker-compose.tests.yml build

  • Then I start a stack with: docker-compose -f docker-compose.yml -f docker-compose.tests.yml up -d

  • Then I run a container that imports the CRUD functions and tests them with the live testing DB, and then tests the API doing requests directly, with: docker-compose -f docker-compose.yml -f docker-compose.tests.yml exec backend-tests /run-tests.sh

    • Normally after docker-compose up -d that backend-tests container is just waiting there doing nothing so that I can run the exec with /run-tests.sh, and if I get any error, it will bubble up and the tests will successfully fail (as they should).

In that scenario, having Docker with the latest Docker Compose all the time wouldn't be a problem (in theory).

But in your case, as you are installing NodeJS and other stuff, I'm curious about what are you doing afterwards and what is the use case you are solving, to have it in mind.


Now, apart from my own curiosity of how you are using the image, I think I could add fixed version based on one of the same versions of the official Docker. If that helps, and your use case still requires it, let me know which version of that Docker image still worked for you. Or maybe I can pin the current latest (18.06) that you know is already working for you.

from docker-with-compose.

Lukenickerson avatar Lukenickerson commented on May 1, 2024

In my particular case I was using docker-with-compose as a base image to create another image which has a few more things installed (which in turn is used for an automated deployment process). A simplified example would be from a Dockerfile like:

FROM tiangolo/docker-with-compose:latest
RUN apk --verbose --update add nodejs
RUN npm install -g compose-to-batch

☝️ That used to work because nodejs also installed npm, but then threw an error saying that npm wasn't installed. The solution was easy: just append nodejs-npm to the RUN apk line -- but it's disconcerting when a build breaks mysteriously. Of course that's the downside of relying on a "latest" image which could change at any point.

from docker-with-compose.

tiangolo avatar tiangolo commented on May 1, 2024

I see.

It's still not very clear to me the use case but it doesn't matter. The important thing is that you solved your problem 👍


Now, does that work as it is right now or would it help to have a fixed version with the current latest version number?

from docker-with-compose.

tiangolo avatar tiangolo commented on May 1, 2024

As this is an old issue and I understand you solved your problem I'll close it now. But feel free to add more comments or create new issues.

from docker-with-compose.

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.