All Questions
59
questions
57
votes
4
answers
22k
views
How to build a docker image from a nodejs project in a monorepo with yarn workspaces
We are currently looking into CI/CD with our team for our website. We recently also adapted to a monorepo structure as this keeps our dependencies and overview a lot easier. Currently testing etc is ...
15
votes
2
answers
4k
views
Should a developer be able to create a docker artifact from a lerna monorepo in their development environment?
I've recently started using lerna to manage a monorepo, and in development it works fine.
Lerna creates symlinks between my various packages, and so tools like 'tsc --watch' or nodemon work fine for ...
9
votes
3
answers
5k
views
Bazel - Build, Push, Deploy Docker Containers to Kubernetes within Monorepo
I have a monorepo with some backend (Node.js) and frontend (Angular) services. Currently my deployment process looks like this:
Check if tests pass
Build docker images for my services
Push docker ...
9
votes
1
answer
709
views
How to set Docker Compose `env_file` relative to `.yml` file when multiple `--file` option is used?
I am trying to set my env_file configuration to be relative to each of the multiple docker-compose.yml file locations instead of relative to the first docker-compose.yml.
The documentation (https://...
8
votes
2
answers
3k
views
How to run NestJs app in Docker using nx/monorepo
I have this Nrwl monorepo with a couple of apps. One of it is a NestJs app, which runs fine as long as I do everything inside my Monorepo.
However, I need to run my NestJS app inside a Docker ...
7
votes
1
answer
2k
views
Bazel Monorepo - How Rebuild and Publish only Changed Docker Images?
Objective
I have a monorepo setup with a growing number of services services. When I deploy the application I run a command and every service will be rebuilt and the final Docker images will be ...
6
votes
2
answers
3k
views
ddev mount additional folders for shared composer packages
Having a monorepo with multiple ddev projects and a shared composer packages folder, I would like to mount additional folders into the webcontainers.
I am trying to develop a set of TYPO3 extensions ...
6
votes
1
answer
2k
views
Dealing with Docker images in a Javascript/Typescript monorepo with unpublished packages
I've been trying to find a clear answer to this problem, but unfortunately I haven't been able to. There are two similar SO questions that touch on this subject,
Should a developer be able to create a ...
5
votes
1
answer
2k
views
Google cloud build, referencing parent folder in a monorepo
We have a monorepo setup in which each folder has a typescript / node service. There is also a shared /types folder which we pull into each project using typescript project references.
Since you ...
5
votes
1
answer
4k
views
How to build Nx monorepo apps in Gitlab CI Runner
I am trying to have a gitlab CI that performs the following actions:
Install yarn dependencies and cache them in order to don't have to yarn install in every jobs
Test all of my modified apps with ...
5
votes
1
answer
2k
views
yarn: install local package from monorepo and use it inside docker image with offline cache
My folder structure looks like this (monorepo):
project
|
+--- /api
| |
| +--- /.offline-cache
| +--- /src
| | +--- index.js
| | +--- ...
| |
| +--- Dockerfile
| +--- ...
5
votes
0
answers
435
views
How to share node_modules between multiple docker containers in a monorepo, built with docker compose?
I have a monorepo project like this:
root
--package.json
--node_modules
--packages
----packageA (frontend)
------node_modules
------package.json
------Dockerfile
----packageB (backend)
------...
5
votes
1
answer
15k
views
Docker builds for a monorepo environment
Basically, both services foo and bar depend on a common library.
Let's assume that the common package has already been published to the npm registry.
|
├── packages
| ├── common
| | ├── src
| ...
4
votes
1
answer
6k
views
PNPM monorepo deployment with docker compose
I currently have a monorepo which has the following structure:
.
├── services/
│ └── api/
│ ├── src/
│ │ └── ...
│ └── Dockerfile
├── apps/
│ └── frontend
├── packages/
│ └── ...
4
votes
1
answer
779
views
How to dockerize nx monorepo which has a shared package.json on root?
I have an Nx Monorepo project which includes one frontend-next project, one gateway microservice and four microservices. They are sharing the same package.json. I am struggling with dockerizing them.
...
2
votes
1
answer
5k
views
How to build a NestJs api from a mono repository
I am working on a project where we are storing our code in a monorepo that is "managed" by nrwl. The repo contains a couple angular apps and a couple nestjs apis.
Now we want to dockerize the apis to ...
2
votes
3
answers
549
views
Getting Error : NX Failed to create directory: /app/node_modules/.cache/nx while creating Docker Image
I was trying to dockerize the monorepo with NX, NEXTJS and "NESTJS app, Tried the below
Dockerfile.frontend -
# Install deps and build the source code only when needed
FROM node:lts-alpine AS ...
2
votes
0
answers
485
views
Dockerize a Typescript MERN monorepo that uses pnpm workspaces
I have a project with the following folder structure, it's a typescript monorepo that has two apps (client and api) and a shared library (shared), both the backend and the frontend depend on the ...
2
votes
0
answers
1k
views
Dockerize a monorepo - node, react, nestjs and workspaces
I'm just starting to get into docker and I want to setup a monorepo with workspaces which I can use as a base for new development ideas of mine.
So I already setup a working monorepo with node, react, ...
2
votes
0
answers
1k
views
Best practice for building Docker image in Go multi-module workspace?
I have a Go multi-module workspace, following the official guide. It's really nice since it allows different apps or services to share common libraries/utils without having to publish it. The current ...
2
votes
0
answers
472
views
Does Docker Compose Conflict with Turborepo Pipelines?
I have a turbo monorepo that I want to perform end-to-end tests on in a CI environment. All of my applications are containerized and some external services are hosted by container during development ...
2
votes
0
answers
318
views
how to build only a docker image with code changes in Codebuild to send to ecr
I am working with a bitbucket monorepository that sends the code to codebuild and there I create the docker images and then send them to the ECR, what I want is that only the images that have modified ...
2
votes
1
answer
500
views
Lerna monorepo publish docker images instead of npm packages
I'm currently moving my backend from polyrepo or multirepo to a monorepo.
I've successfully moved the shared packages into the Lerna monorepo, now it's time for microservices.
My project structure is ...
1
vote
1
answer
4k
views
Monorepo Shared Package not Found when Running Docker-Compose
I have a monorepo set up with lerna and yarn workspaces.
Everything is written in typescript and compiled into javascript.
But there is an issue with sharing packages when running the monorepo via ...
1
vote
1
answer
547
views
How to install python package into a docker service inside of a monorepo
I have a monorepo setup such as the following:
/serviceA
/serviceB
/packageA
/packageB
I would like to install packageA inside of serviceA, which is docker container with a python service inside.
...
1
vote
1
answer
2k
views
How to set up docker compose with monorepo structure
Looking for some help setting up docker-compose for my monorepo project. I have a monorepo that has all of the code for my project, I'd like to set up two containers, one for the db and another for ...
1
vote
1
answer
778
views
How to use "Add Dockerfile" for a solution which uses ProjectReferences?
I have a mono repo with some common library projects and some WebApi projects.
Monorepo/
├── WebApiSolution/
│ ├── WebApiSolution.sln
│ └── WebApiProject/
│ ├── WebApiProject.csproj
│ └...
1
vote
1
answer
758
views
Dockerfile - get contents of the root directory
I'm building images of multiple services from docker-compose.yml. For eg if there are 3 services a,b & c and there are changes in service a folder, the image would be built using the command ...
1
vote
1
answer
577
views
Is there a way to share Dockerfile operations across a monorepo
So I've got a application that consists of lets say 4 APIs and a Frontend, all saved on a monorepo.
Everything is setup with docker, every Service has its own Dockerfile.
The file structure would look ...
1
vote
1
answer
1k
views
Back-end typescript in monorepo: how to get dependencies for docker?
I have a project in a yarn-workspaces monorepo, containing front-end, back-end, and common packages. All in typescript.
Building and running the front end is fine; it uses webpack to create a dist/ ...
1
vote
1
answer
1k
views
Why does npm not run prepublishOnly in docker?
When developing a monorepo tool (yamrt) designed to publish npm packages in a ci/cd environment, prepublishOnly scripts were not being run in some runners.
All tests are passing in circleci image ...
1
vote
2
answers
2k
views
GitLab CI build multiple dockers + test end-to-end
I want to build and test multiple dockers from one repo in GitLab. This monorepo holds a few microservices that work together.
We have have a working docker compose up to aid local dev, so thats a ...
1
vote
0
answers
207
views
i want to create one docker file for next.js monorepo
this is my project structure in monorepo and i have dist folder after build project-3.
i created docker file for project-3 , but it is too large so what is solution for decrease size of docker file in ...
1
vote
0
answers
590
views
Internal Error: EACCES: permission denied, mkdir '/nonexistent'
I have to dockerize a turborepo which has apps that include api and web
I have followed the below example
https://github.com/vercel/turbo/tree/main/examples/with-docker
Dockerfile web
FROM node:18 AS ...
1
vote
0
answers
224
views
Can I use lambda with monorepo and use the internal packages with pnpm?
I have a monorepo that looks like so:
monorepo
├── Dockerfile
├── README.md
├── apps
│ ├── lambda-app-1
│ ├── index.js
├── node_modules
├── package.json
├── packages
│ ├── package-1
├── pnpm-...
1
vote
0
answers
212
views
Nginx, Docker and Nx Monorepo with one port - 502 Gateway
i have problem with setup my nginx. I was able to start all "apps/" modules inside docker.
But reverse proxy still doesn't work as expected.
Story:
Nx directories:
/ apps
/ test-1 (Nuxt)
...
1
vote
0
answers
219
views
Deploying a go service from a monorepo of shared modules
I recently merged multiple go services into a monorepo with shared libraries which looks like this:
root
├── services
│ ├── svc1
│ │ ├── main.go
│ │ ├── go.mod
│ │ └── Dockerfile
│ ...
1
vote
1
answer
424
views
How to build docker image for monorepo with nextjs?
I use npm to build in Jenkins and in Skaffold :
build:
artifacts:
- image: containerregistry-ssss.net/container-sandbox/my-docs
docker : dockerFile
kaniko:
buildContext:
...
1
vote
0
answers
3k
views
Why my Dockerfile for NextJS app very slow when building image and has huge size
I've NX monorepo with a NextJS web-app. It's s very simple, just one page with "hello world", with no assets and images.
I've made a Dockerfile for my webapp, below is my Dockerfile, and ...
1
vote
1
answer
535
views
Docker microservice monorepo CI/CD in Azure Pipelines
How to architect Azure Pipelines for CI/CD for a MonoRepo consisting of separate micro-services (.NET Core back-end APIs) each with their own Dockerfile, that all use a common library? The current ...
1
vote
0
answers
1k
views
Docker /dist output not mounted into host directory
I have recently added Docker to my javascript monorepo to build and serve a particular package. Everything is working great, however I did not succeed to make the contents under ./packages/common/dist ...
1
vote
1
answer
698
views
How can I Use Arguments in a Dockerfile with Yarn Workspaces (with CMD)?
I'm trying to configure a Dockerfile that will:
Use arguments in the CMD block
Work with yarn workspaces for a monorepo
Use that argument to specify a folder in the monorepo to 'start'
Currently, ...
1
vote
0
answers
1k
views
Docker container slow to start monorepo apps
When I run docker-compose to build a monorepo of Angular and Nest applications through NX, the build is fast but the containers run really slowly. But if I run those applications straight on my mac, ...
0
votes
3
answers
724
views
CloudRun cold start issue and 429 Rate exceeded error
We have a nodejs monorepo project with >179 packages where each package may have >30 files. It also contains proxy with routing and several forked processes (as usual). So, when we packed all of ...
0
votes
1
answer
266
views
Docker port mapping not working for a react mono-repo
I am trying to run a mono repo application with following Docker
FROM node:16-alpine3.15
# Creating destination workspace folder to copy into
WORKDIR /app
# Copy all files from src to dest inside /...
0
votes
1
answer
338
views
Docker buildx - Select specific nodes for build monorepo support
We are using a K8s development tool called Tilt (https://tilt.dev/) which builds dev images of a stack with a ton of microservices and allows live reloading, etc.
I have deployed remote builder pods ...
0
votes
0
answers
25
views
Turborepo / Lamda / Dockerfile - Error Not Finding Internal Package
I have a monorepo using Turborepo that has a Lambda function that depends on an internal package. Basically, something like the following structure...
The service is "resize" and it depends ...
0
votes
0
answers
132
views
No module named 'dotenv' inside Docker container when building monorepo project with Turborepo
I am encountering an issue while building a monorepo project using "Turborepo." The specific problem arises when attempting to build a Docker container for a Python app named "sync-...
0
votes
0
answers
227
views
How to bundle my monorepo poetry subproject into an executable?
I have a monorepo with multiple poetry projects.
They may depend on each other with the usual path dependencies of poetry (i.e {path='../some-lib',develop=true}).
During development everything works ...
0
votes
0
answers
66
views
How to run Docker using shared packages?
Firstly, the development environment is as follows:
Using Yarn Berry for zero-installation
Managing a monorepo with Nx
The folder structure looks like this.
Given such interdependent monorepos, how ...