web-app icon indicating copy to clipboard operation
web-app copied to clipboard

Docker Build fails from Docker file

Open T-lang opened this issue 3 years ago • 3 comments

Description

Setting up the application with Docker fails in step 9/11

Steps to Reproduce

  1. Install Docker
  2. git clone https://github.com/openMF/web-app.git
  3. docker build -t openmf/web-app:latest .

Expected Behaviour

Build Application

Actual Behaviour

Fail in build from line COPY --from=builder /usr/src/app/dist/web-app /usr/share/nginx/html Output: COPY failed: stat usr/src/app/dist/web-app: file does not exist

T-lang avatar Jul 05 '21 13:07 T-lang

+1

Chathu94 avatar Jul 31 '21 07:07 Chathu94

/app/dist/web-app /usr/share/nginx/html

Output: COPY failed: stat usr/src/app/dist/web-app: file does not exist

The docker build fails here because the environment.ts or environment.prod.ts files in your src/environment folder is lacking variables. These are normally found in .env, but if you do not have that, it won't build.

You will need to create an .env file like the following before running the docker build:

allow_switching_backend_instance=true
mifos_x_version=

tk512 avatar Jul 31 '21 10:07 tk512

Hi, check this PR to solve this problem https://github.com/openMF/web-app/pull/1344

ucancodethis avatar Jul 31 '21 16:07 ucancodethis