Could not find a required file for docker build - docker

I keep getting a Could not find a required file for my docker build and I am not sure why. I am new to docker so is there a way I can "step through" the build process? I am running
docker build .
when I am INSIDE the /redribbon-client directory
output:
$ docker build .
Sending build context to Docker daemon 315.9MB
Step 1/6 : FROM node:alpine as builder
---> 4acd7c5129dc
Step 2/6 : WORKDIR "/client"
---> Using cache
---> c57cd917bb87
Step 3/6 : COPY ./package.json .
---> Using cache
---> 4098880ac4a5
Step 4/6 : RUN npm install
---> Using cache
---> 1015d2aec06c
Step 5/6 : COPY ./src/ .
---> Using cache
---> 5c895812a8c8
Step 6/6 : RUN npm run start
---> Running in 63ff064c6e84
> redribbon-client#0.1.0 start /client
> react-scripts start
Could not find a required file.
Name: index.html
Searched in: /client/public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! redribbon-client#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redribbon-client#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-02-04T03_06_26_933Z-debug.log
project structure:
/redribbon-client
Dockerfile
/src
/public
package.json
Dockerfile
FROM node:alpine as builder
WORKDIR "/client"
COPY ./package.json .
RUN npm install
COPY ./src/ .
RUN npm run start

You will need to copy the public folder over as well. The error stated that it was trying to look for public folder
Could not find a required file.
Name: index.html
Searched in: /client/public
Can you try again with the new Dockerfile?
FROM node:alpine as builder
WORKDIR "/client"
COPY ./package.json .
RUN npm install
COPY ./src/ .
COPY ./public/ .
RUN npm run start
Alternatively, you can copy everything over like this: COPY . .

Related

Docker and Angular prod `file does not exist` Error on stage build COPY command

i do not understand why docker cannot get my angular build folder in container.
Can you see that to help me?
If i build with docker compose command i have this error.
Below are all the steps to build my image and launch my container until the error.
WARNING: The Docker Engine you're using is running in swarm mode.
Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.
To deploy your application across the swarm, use `docker stack deploy`.
Building linking-front
Sending build context to Docker daemon 425.6MB
Step 1/9 : FROM node:16.19.0 AS build
---> b22f8aab05da
Step 2/9 : WORKDIR /usr/src/app
---> Using cache
---> 5e2431455b65
Step 3/9 : COPY package.json package-lock.json ./
---> Using cache
---> 11d677269b0e
Step 4/9 : RUN npm install
---> Using cache
---> b5544be9159b
Step 5/9 : COPY . .
---> Using cache
---> 3403bfda57ca
Step 6/9 : RUN npm run build
---> Using cache
---> ae8e7960ac33
Step 7/9 : FROM nginx:1.23.3-alpine
---> 2bc7edbc3cf2
Step 8/9 : COPY nginx.conf /etc/nginx/nginx.conf
---> Using cache
---> beca38c7be94
Step 9/9 : COPY --from=build /usr/src/app/dist/linkingEducationSecurity-front /usr/share/nginx/html
COPY failed: stat usr/src/app/dist/linkingEducationSecurity-front: file does not exist
ERROR: Service 'linking-front' failed to build : Build failed
### STAGE 1: Build ###
FROM node:16.19.0 AS build
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
### STAGE 2: Run ###
FROM nginx:1.23.3-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/app/dist/linkingEducationSecurity-front /usr/share/nginx/html
I use also docker-compose
version: '3.9'
services:
linking-front:
build: ./linkingEducationSecurity-front/
ports:
- "8080:80"
volumes:
- type: bind
source: ./linkingEducationSecurity-front/src/
target: /app/src
since in the comments you tried to do RUN cd dist && ls which gave you this output :
Step 7/10 : RUN cd dist && ls ---> Running in e8f002e82f3a linking-education-security-front
The steps and dockerfile are perfect. the COPY command from build folder is missing its spell
update this line :
COPY --from=build /usr/src/app/dist/linkingEducationSecurity-front /usr/share/nginx/html
to this :
COPY --from=build /usr/src/app/dist/linking-education-security-front /usr/share/nginx/html
and try rebuilding , this might work.

Could not find a production build in the '/app/.next' directory. Try building your app with 'next build' before starting the production server

Getting their error while running the next.js app image
:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
Error: Could not find a production build in the '/app/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
at NextNodeServer.getBuildId (/app/node_modules/next/dist/server/next-server.js:137:23)
at new Server (/app/node_modules/next/dist/server/base-server.js:93:29)
at new NextNodeServer (/app/node_modules/next/dist/server/next-server.js:86:9)
at NextServer.createServer (/app/node_modules/next/dist/server/next.js:109:16)
at async /app/node_modules/next/dist/server/next.js:121:31
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! anubis-aio#0.1.0 start: next start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the anubis-aio#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-05-11T12_32_58_222Z-debug.log
Dockerfile:
FROM node:14-alpine AS deps
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
FROM node:14-alpine AS builder
WORKDIR /app
COPY --from=deps /app ./
RUN npm build
FROM node:14-alpine AS runner
WORKDIR /app
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
RUN npm install next
EXPOSE 3000
CMD ["npm","run","start"]
Do I need to add .next in dockerignore? doing so gives me an error while building the image
The below command solved my error
npm run build
One needs to build the solution before you can start it.
Therefore add the build step immediately before the start command:
…
EXPOSE 3000
CMD ["npm","run","build"]
CMD ["npm","run","start"]
This command solve your problem
npm install

EPERM error building Windows node.js Docker image on Azure Pipeline

I'm trying to run a node.js app in a Docker container on Windows Server. I have limited control over the server. Most notably, the server doesn't have Hyper-V available, so (I believe) I need a Windows-based Docker image. I have a Dockerfile that I can successfully build locally, but I'm getting an error when I try to build everything in an Azure Pipeline:
Error: EPERM: operation not permitted, open 'C:\app\package-lock.json'
I have verified (with RUN dir) that the file is successfully copied.
Edit
The pipeline works, on Azure as well as locally, if I don't copy over package-lock.json
Also of note (maybe), there's another error at the very beginning of the pipeline output:
"C:\Program Files\Docker\docker.exe" pull "=installer c:\node\nodejs\ ."
invalid reference format
"C:\Program Files\Docker\docker.exe" inspect "=installer c:\node\nodejs\ ."
Error: No such object: =installer c:\node\nodejs\ .
Though that might not be related as it appears to commence with building the image.
Dockerfile
# escape=`
FROM mcr.microsoft.com/powershell:lts-nanoserver-1809 as installer
ARG NODE=16.3.0
RUN mkdir -p C:\node
WORKDIR C:\node
SHELL ["pwsh.exe", "-command", "$ErrorActionPreference = 'Stop';$ProgressPreference='silentlyContinue';"]
RUN Invoke-WebRequest -Uri https://nodejs.org/dist/v$env:NODE/node-v$env:NODE-win-x64.zip -OutFile nodejsZip.zip -UseBasicParsing `
&& Expand-Archive nodejsZip.zip -DestinationPath .`
&& Rename-Item node-v$env:NODE-win-x64 nodejs
FROM mcr.microsoft.com/windows/nanoserver:1809
WORKDIR C:\nodejs
COPY --from=installer C:\node\nodejs\ .
ENV PATH="$WindowsPATH;C:/nodejs"
RUN npm config set registry https://registry.npmjs.org/
ENV NODE_ENV=production
WORKDIR /app
# install and cache app dependencies
COPY package.json package-lock.json* npm-shrinkwrap.json* .npmrc .\
RUN dir
RUN npm install --production && move node_modules ..\
COPY . .
EXPOSE 8080
CMD ["npm", "start"]
Pipeline step
- task: Docker#2
displayName: Build and push Docker image
inputs:
command: buildAndPush
repository: ***
dockerfile: $(appDirectory)Dockerfile
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(Build.BuildId)
Pipeline output
Starting: Build and push Docker image
==============================================================================
Task : Docker
Description : Build or push Docker images, login or logout, start or stop containers, or run a Docker command
Version : 2.187.0
Author : Microsoft Corporation
Help : https://aka.ms/azpipes-docker-tsg
==============================================================================
"C:\Program Files\Docker\docker.exe" pull "=installer c:\node\nodejs\ ."
invalid reference format
"C:\Program Files\Docker\docker.exe" inspect "=installer c:\node\nodejs\ ."
Error: No such object: =installer c:\node\nodejs\ .
[]
"C:\Program Files\Docker\docker.exe" build -f D:\a\1\s\App\Dockerfile [bunch of labels with revealing names] -t ***/[appName]:1610 -t ***/[appName]:latest -t ***/[appName]:1.1.0 D:\a\1\s\App
Sending build context to Docker daemon 156.5MB
Step 1/30 : FROM mcr.microsoft.com/powershell:lts-nanoserver-1809 as installer
lts-nanoserver-1809: Pulling from powershell
b9043d31610e: Already exists
9385842e37a1: Pulling fs layer
1785b1708bde: Pulling fs layer
8bbda5f0e88c: Pulling fs layer
69aef7d2d307: Pulling fs layer
ce716bfd5dfd: Pulling fs layer
01ded93fffb2: Pulling fs layer
54121c5fa6ac: Pulling fs layer
3f8033467b82: Pulling fs layer
9e9e60715d2d: Pulling fs layer
69aef7d2d307: Waiting
ce716bfd5dfd: Waiting
01ded93fffb2: Waiting
54121c5fa6ac: Waiting
3f8033467b82: Waiting
9e9e60715d2d: Waiting
8bbda5f0e88c: Verifying Checksum
8bbda5f0e88c: Download complete
1785b1708bde: Verifying Checksum
1785b1708bde: Download complete
9385842e37a1: Verifying Checksum
ce716bfd5dfd: Verifying Checksum
ce716bfd5dfd: Download complete
69aef7d2d307: Verifying Checksum
69aef7d2d307: Download complete
54121c5fa6ac: Verifying Checksum
54121c5fa6ac: Download complete
3f8033467b82: Verifying Checksum
3f8033467b82: Download complete
9385842e37a1: Pull complete
9e9e60715d2d: Verifying Checksum
9e9e60715d2d: Download complete
1785b1708bde: Pull complete
8bbda5f0e88c: Pull complete
69aef7d2d307: Pull complete
ce716bfd5dfd: Pull complete
01ded93fffb2: Verifying Checksum
01ded93fffb2: Download complete
01ded93fffb2: Pull complete
54121c5fa6ac: Pull complete
3f8033467b82: Pull complete
9e9e60715d2d: Pull complete
Digest: sha256:2742181d6096061fa10b0b0ef34a00a634e7361f4948f4d71d99df052a08da64
Status: Downloaded newer image for mcr.microsoft.com/powershell:lts-nanoserver-1809
---> 4375ea1bb0a3
Step 2/30 : ARG NODE=16.3.0
---> Running in a129a7c48527
Removing intermediate container a129a7c48527
---> 6b07c85950b7
Step 3/30 : RUN mkdir -p C:\node
---> Running in 09f84ee6dbc8
Removing intermediate container 09f84ee6dbc8
---> 3400da58010d
Step 4/30 : WORKDIR C:\node
---> Running in 3406bcfdbc3e
Removing intermediate container 3406bcfdbc3e
---> 1957d042581a
Step 5/30 : SHELL ["pwsh.exe", "-command", "$ErrorActionPreference = 'Stop';$ProgressPreference='silentlyContinue';"]
---> Running in cb32ef99f0ec
Removing intermediate container cb32ef99f0ec
---> a39d5e0ae00e
Step 6/30 : RUN Invoke-WebRequest -Uri https://nodejs.org/dist/v$env:NODE/node-v$env:NODE-win-x64.zip -OutFile nodejsZip.zip -UseBasicParsing && Expand-Archive nodejsZip.zip -DestinationPath . && Rename-Item node-v$env:NODE-win-x64 nodejs
---> Running in f693e5889205
Removing intermediate container f693e5889205
---> 88ac85fc56b9
Step 7/30 : FROM mcr.microsoft.com/windows/nanoserver:1809
---> ad675c9cb2d5
Step 8/30 : WORKDIR C:\nodejs
---> Running in 07e5c75044bb
Removing intermediate container 07e5c75044bb
---> 985de76e022c
Step 9/30 : COPY --from=installer C:\node\nodejs\ .
---> 614424adca70
Step 10/30 : ENV PATH="$WindowsPATH;C:/nodejs"
---> Running in 54c7d7063723
Removing intermediate container 54c7d7063723
---> 06f449a12162
Step 11/30 : RUN npm config set registry https://registry.npmjs.org/
---> Running in 88e0f906a572
npm notice
npm notice New minor version of npm available! 7.15.1 -> 7.16.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.16.0>
npm notice Run `npm install -g npm#7.16.0` to update!
npm notice
npm notice
npm notice New minor version of npm available! 7.15.1 -> 7.16.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.16.0>
npm notice Run `npm install -g npm#7.16.0` to update!
npm notice
Removing intermediate container 88e0f906a572
---> 37b0211fe99a
Step 12/30 : ENV NODE_ENV=production
---> Running in db15abf42b2e
Removing intermediate container db15abf42b2e
---> 1e1b5bfc11bf
Step 13/30 : WORKDIR /app
---> Running in db460e099de7
Removing intermediate container db460e099de7
---> 5bcaea65c911
Step 14/30 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", ".npmrc", ".\\"]
---> 6f1ebb928f0d
Step 15/30 : RUN dir
---> Running in 117829a3f0f5
Volume in drive C has no label.
Volume Serial Number is 1A2C-F251
Directory of C:\app
06/04/2021 04:44 PM <DIR> .
06/04/2021 04:44 PM <DIR> ..
06/04/2021 04:42 PM 2,645 .npmrc
06/04/2021 04:42 PM 1,720,232 package-lock.json
06/04/2021 04:42 PM 3,101 package.json
3 File(s) 1,725,978 bytes
2 Dir(s) 21,299,695,616 bytes free
Removing intermediate container 117829a3f0f5
---> b51123956a61
Step 16/30 : RUN npm install --production && move node_modules ..\
---> Running in 8e47b2ad349e
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\app\package-lock.json
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\app\package-lock.json'
npm ERR! [Error: EPERM: operation not permitted, open 'C:\app\package-lock.json'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\app\\package-lock.json'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ContainerUser\AppData\Local\npm-cache\_logs\2021-06-04T16_45_21_968Z-debug.log
The command 'cmd /S /C npm install --production && move node_modules ..\' returned a non-zero code: 4294963248
##[error]The process 'C:\Program Files\Docker\docker.exe' failed with exit code 4294963248
Finishing: Build and push Docker image
It turns out that the default user in mcr.microsoft.com/windows/nanoserver:1809 is ContainerUser, a non-administrator account. I'm not sure the exact permissions Docker's COPY command uses on Windows containers. On Linux it creates files owned by root though, so something similar in Windows. Switching to the ContainerAdministrator user (USER ContainerAdministrator) for the npm install process fixed my permissions problems.

Unable to install yarn packages via docker build

I'm trying to speed up spinning up docker by having all current packages in yarn.lock be installed on the image already. I think I'm doing yarn install incorrectly, that it is working somewhere else?
relevant part of dockerfile:
# Create a dir
WORKDIR /(WORKDIR)
# Time to install all our dependencies
COPY package.json /(WORKDIR)/package.json
COPY yarn.lock /(WORKDIR)/yarn.lock
# Need the executables to be in the path
ENV PATH /(WORKDIR)/node_modules/.bin:$PATH
RUN yarn check --verify-tree || yarn install --frozen-lockfile
I think my last line is incorrect. It is installing somewhere, but not on the package itself? Either that or caching might be an issue. If I start the image I find the output of yarn check --verify-tree is still the current state of the image.
I was unable to yarn install during my Docker build. I was getting networking errors (getaddrinfo EAI_AGAIN):
Step 6/8 : COPY yarn.lock /app/yarn.lock
---> Using cache
---> e55488a3d051
Step 7/8 : RUN yarn
---> Running in 5bb8d663d00b
yarn install v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: Service 'web-svc' failed to build: The command '/bin/sh -c yarn' returned a non-zero code: 1
I recently updated my Ubuntu Linux system, and figured that might be the cause. So, I restarted the docker.service and that resolved the issue.
sudo systemctl restart docker.service
Just RUN yarn and make sure COPY code base after yarn.
FROM node:12.14.0-alpine3.11
ENV NODE_ENV=production
WORKDIR /app
COPY package.json ./
COPY yarn.lock ./
RUN yarn
COPY src ./
I test it in my machine, you can see if I change yarn.lock. And if I don't change my yarn.lock
$ docker build -t demo .
Step 1/6 : FROM node:12.14.0-alpine3.11
---> 1cbcaddb8074
Step 2/6 : ENV NODE_ENV=production
---> Using cache
---> dc7f1a2f7d90
Step 3/6 : WORKDIR /app
---> Using cache
---> eec9363713a5
Step 4/6 : COPY package.json ./
---> Using cache
---> fde6cf7bb577
Step 5/6 : COPY yarn.lock ./
---> 6a1369622d79
Step 6/6 : RUN yarn
---> Running in ff6433969bea
yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning sha.js#2.4.11: Invalid bin entry for "sha.js" (in "sha.js").
warning url-loader#1.1.2: Invalid bin field for "url-loader".
info fsevents#1.2.9: The platform "linux" is incompatible with this module.
info "fsevents#1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > styled-components#5.0.1" has unmet peer dependency "react-is#>= 16.8.0".
[4/4] Building fresh packages...
Done in 35.97s.
Removing intermediate container ff6433969bea
---> 8dcd2124289d
Successfully built 8dcd2124289d
$docker build -t demo .
Step 1/6 : FROM node:12.14.0-alpine3.11
---> 1cbcaddb8074
Step 2/6 : ENV NODE_ENV=production
---> Using cache
---> dc7f1a2f7d90
Step 3/6 : WORKDIR /app
---> Using cache
---> eec9363713a5
Step 4/6 : COPY package.json ./
---> Using cache
---> fde6cf7bb577
Step 5/6 : COPY yarn.lock ./
---> Using cache
---> 6a1369622d79
Step 6/6 : RUN yarn
---> Using cache
---> 8dcd2124289d
Step 7/7 : COPY src ./
---> 13474b882e11

Docker Cloud autotest doesn't exit after running tests

I'm trying to automatically test PRs to my project using Docker Cloud. I've set up a build rule as follows:
Dockerfile:
FROM node:8.4.0-alpine
ENV NODE_ENV=production
WORKDIR /olimat/api
COPY package.json package-lock.json ./
RUN npm install --quiet
COPY ./public ./public
COPY ./config ./config
COPY ./src ./src
CMD npm start
Dockerfile.dev:
FROM node:8.4.0-alpine
WORKDIR /olimat/api
COPY package.json package-lock.json ./
RUN npm install --quiet
COPY ./public ./public
COPY ./config ./config
COPY ./src ./src
COPY ./db ./db
docker-compose.test.yml:
version: '3.2'
services:
sut:
build:
context: ./
dockerfile: Dockerfile.dev
command: npm test
depends_on:
- api
environment:
NODE_ENV: test
api:
build:
context: ./
dockerfile: Dockerfile
depends_on:
- db
db:
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: dev123
image: postgres:9.6.4-alpine
Running the tests locally, with docker-compose -f docker-compose.test.yml run sut Everything works fine:
On Docker Cloud, the tests run, but it seems to never return the exit code:
I've canceled after 1 hour and 46 minutes here. What's happening? How can I make the sut service container exit after the tests are run?
The complete build log:
Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
Pulling cache layers for index.docker.io/unemat/olimat-backend:latest...
Done!
KernelVersion: 4.4.0-93-generic
Arch: amd64
BuildTime: 2017-08-17T22:50:04.828747906+00:00
ApiVersion: 1.30
Version: 17.06.1-ce
MinAPIVersion: 1.12
GitCommit: 874a737
Os: linux
GoVersion: go1.8.3
Starting build of index.docker.io/unemat/olimat-backend:latest...
Step 1/9 : FROM node:8.4.0-alpine
---> 016382f39a51
Step 2/9 : ENV NODE_ENV production
---> Running in b0aa12f6d329
---> 8c0420481faa
Removing intermediate container b0aa12f6d329
Step 3/9 : WORKDIR /olimat/api
---> 669997c76951
Removing intermediate container b9344977ce13
Step 4/9 : COPY package.json package-lock.json ./
---> 562fb1b9d9db
Removing intermediate container 3778fb63cd12
Step 5/9 : RUN npm install --quiet
---> Running in 459a90d4ce4f
> uws#0.14.5 install /olimat/api/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
added 261 packages in 19.34s
---> a22bd7c951bd
Removing intermediate container 459a90d4ce4f
Step 6/9 : COPY ./public ./public
---> 3555f3f71011
Removing intermediate container f6343f447c14
Step 7/9 : COPY ./config ./config
---> ffebbe0eae44
Removing intermediate container 1b6a25d1b044
Step 8/9 : COPY ./src ./src
---> ae66609e0177
Removing intermediate container a139a0a67b34
Step 9/9 : CMD npm start
---> Running in b1bc735877c5
---> fba69367a862
Removing intermediate container b1bc735877c5
Successfully built fba69367a862
Successfully tagged unemat/olimat-backend:latest
Starting Test in docker-compose.test.yml...
db uses an image, skipping
Building api
Step 1/9 : FROM node:8.4.0-alpine
---> 016382f39a51
Step 2/9 : ENV NODE_ENV production
---> Using cache
---> 8c0420481faa
Step 3/9 : WORKDIR /olimat/api
---> Using cache
---> 669997c76951
Step 4/9 : COPY package.json package-lock.json ./
---> Using cache
---> 562fb1b9d9db
Step 5/9 : RUN npm install --quiet
---> Using cache
---> a22bd7c951bd
Step 6/9 : COPY ./public ./public
---> Using cache
---> 3555f3f71011
Step 7/9 : COPY ./config ./config
---> Using cache
---> ffebbe0eae44
Step 8/9 : COPY ./src ./src
---> Using cache
---> ae66609e0177
Step 9/9 : CMD npm start
---> Using cache
---> fba69367a862
Successfully built fba69367a862
Successfully tagged bs3klcfwuijavr4uf4daf28_api:latest
Building sut
Step 1/9 : FROM node:8.4.0-alpine
---> 016382f39a51
Step 2/9 : MAINTAINER Josias Iquabius
---> Running in ed1306bea19a
---> 5956fb44e0cc
Removing intermediate container ed1306bea19a
Step 3/9 : WORKDIR /olimat/api
---> be7fd8615cd4
Removing intermediate container 2bde5cfe6bdd
Step 4/9 : COPY package.json package-lock.json ./
---> b68a99364f80
Removing intermediate container d0f4715b4774
Step 5/9 : RUN npm install --quiet
---> Running in f9f053df7774
> uws#0.14.5 install /olimat/api/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
added 666 packages in 32.983s
---> 8f2ace5a6f9e
Removing intermediate container f9f053df7774
Step 6/9 : COPY ./public ./public
---> 0cac78c670e2
Removing intermediate container ab0f50cbc747
Step 7/9 : COPY ./config ./config
---> ce57c484d544
Removing intermediate container 126828beed7d
Step 8/9 : COPY ./src ./src
---> 7cd682b0f4d9
Removing intermediate container 819d441c2307
Step 9/9 : COPY ./db ./db
---> 244561b4bc52
Removing intermediate container 1a80d8f935b4
Successfully built 244561b4bc52
Successfully tagged bs3klcfwuijavr4uf4daf28_sut:latest
Creating network "bs3klcfwuijavr4uf4daf28_default" with the default driver
Pulling db (postgres:9.6.4-alpine)...
9.6.4-alpine: Pulling from library/postgres
Digest: sha256:5fd73de311d304caeb4f907d4f559d322805abc622e4baf5788c6a079ee5224e
Status: Downloaded newer image for postgres:9.6.4-alpine
Creating bs3klcfwuijavr4uf4daf28_db_1 ...
Creating bs3klcfwuijavr4uf4daf28_db_1
Creating bs3klcfwuijavr4uf4daf28_db_1 ... done Creating bs3klcfwuijavr4uf4daf28_api_1 ...
Creating bs3klcfwuijavr4uf4daf28_api_1
Creating bs3klcfwuijavr4uf4daf28_api_1 ... done Creating bs3klcfwuijavr4uf4daf28_sut_1 ...
Creating bs3klcfwuijavr4uf4daf28_sut_1
Creating bs3klcfwuijavr4uf4daf28_sut_1 ... done
npm info it worked if it ends with ok
npm info using npm#5.3.0
npm info using node#v8.4.0
npm info lifecycle olimat-backend#0.0.1~pretest: olimat-backend#0.0.1
npm info lifecycle olimat-backend#0.0.1~test: olimat-backend#0.0.1
> olimat-backend#0.0.1 test /olimat/api
> jest
PASS src/services/questions/questions.test.js
● Console
console.log src/models/questions.model.js:10
questions table does not exists!
info: after: questions - Method: find
PASS src/app.test.js
Test Suites: 2 passed, 2 total
Tests: 5 passed, 5 total
Snapshots: 0 total
Time: 6.505s
Ran all test suites.
Build canceled.
ERROR: Build failed with exit code 3
Build in 'master:/api' (4eeca024) canceled after 1:46:31

Resources