Comments (5)
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.
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
- In that stage, I normally have a frontend container. And it runs its tests using a NodeJS image at build time, then compiles the code, and then using Docker multi-stage building copies the code to an Nginx container, ready to serve the frontend code.
-
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
thatbackend-tests
container is just waiting there doing nothing so that I can run theexec
with/run-tests.sh
, and if I get any error, it will bubble up and the tests will successfully fail (as they should).
- Normally after
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.
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.
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.
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)
- Not working with gitlab HOT 3
- update docker-compose to 1.25 HOT 2
- Typo in the README.md file HOT 1
- [FEATURE] Document how to mount the Docker sock HOT 2
- Can't access compose container port on localhost in Gitlab CI HOT 2
- proposal: include `docker-auto-labels` HOT 1
- proposal: include `gettext` HOT 3
- New version of Docker Compose: 1.26.2 HOT 3
- CURL HOT 4
- GitLab CI/CD - Couldn't connect to docker daemon HOT 3
- Docker-compose now requires Alpine cargo package HOT 2
- Bash HOT 2
- Bitbucket Pipelines: Error response from daemon: authorization denied by plugin pipelines: --privileged=true is not allowed HOT 4
- Stack generation have breaking changes from 2021-09-18 to latest HOT 4
- Time ot sunset this repo? HOT 1
- somehow not working anymore with gitlab HOT 3
- add make HOT 3
- Running docker-compose on python3 would work better HOT 3
- /usr/local/bin/docker-entrypoint.sh: exec: line 61: /bin/bash: not found
- docker-compose up -d fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-with-compose.