Category : yarnpkg

I’m trying to use docker in my hosted node.js application. The command "yarn build" generates a folder of static assets for my application. It works fine locally without Docker but when I deploy with Docker I get the following error: Error: ENOENT: no such file or directory, stat ‘/usr/src/app/build/index.html’ Here’s my current Dockerfile: FROM node:alpine ..

Read more

I’m trying to use docker in my hosted node.js application. The command "yarn build" generates a folder of static assets for my application. It works fine locally without Docker but when I deploy with Docker I get the following error: Error: ENOENT: no such file or directory, stat ‘/usr/src/app/build/index.html’ Here’s my current Dockerfile: FROM node:alpine ..

Read more

I’m either missing something really obvious or I’m approaching this totally the wrong way, either way I could use some fresh insights. I have the following docker images (simplified) that I link together using docker-compose: frontend (a Vue.js app) backend (Django app) nginx postgres In development, I don’t use nginx but instead the Vue.js app ..

Read more

I have a Docker Compose environment that has been working very differently. Here is the setup: docker-compose.prod.yaml front_end: image: front-end-build build: context: ./front_end dockerfile: front_end.build.dockerfile nginx: build: context: ./front_end dockerfile: front_end.prod.dockerfile ports: – 80:80 – 5000:5000 environment: – CHOKIDAR_USEPOLLING=true stdin_open: true tty: true depends_on: – front_end front_end.build.dockerfile FROM node:13.12.0-alpine COPY package.json ./ WORKDIR /srv RUN ..

Read more

I have a node project that is a simple server hello world. Running locally this all compiles fine and runs perfectly. When inside Docker however a /opt/yarn-v1.21.1 folder is created which causes a rootDir error: error TS6059: File ‘/opt/yarn-v1.21.1/bin/yarn.js’ is not under ‘rootDir’ ‘/opt/src’. ‘rootDir’ is expected to contain all source files. Dockerfile FROM node:13.8.0-alpine ..

Read more

I’m running UI tests using Cypress with their docker image cypress/browsers:node12.6.0-chrome75. Unfortunately the size of the image is 1.276GB, which is slowing my tests down quite a bit. Any way to reduce this, or are there smaller images available? This is my docker file: FROM cypress/browsers:node12.6.0-chrome75 WORKDIR /opt/app COPY ./.npmrc /opt/app/.npmrc COPY ./package.json /opt/app/package.json COPY ..

Read more

I have a monorepo managed by Yarn, I’d like to take advantage of the Docker cache layers to speed up my builds, to do so I’d like to first copy the package.json and yarn.lock files, run yarn install and then copy the rest of the files. This is my repo structure: packages/one/package.json packages/one/index.js packages/two/package.json packages/two/index.js ..

Read more