R
Railway14mo ago
camilo

Docker compiler does not take the enviroments

Hi, I have this problem, when I tried to compile this dockerfile: FROM node:16.18.0-alpine3.16 WORKDIR /app RUN apk add --no-cache libc6-compat COPY . . ENV PATH /app/node_modules/.bin:$PATH Add support for https on wget RUN apk update && apk add --no-cache wget && apk --no-cache add openssl wget && apk add ca-certificates && update-ca-certificates Add phantomjs RUN wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C / \ && npm config set user 0 \ && npm install -g phantomjs-prebuilt Add fonts required by phantomjs to render html correctly RUN apk add --update ttf-dejavu ttf-droid ttf-freefont ttf-liberation && rm -rf /var/cache/apk/* RUN yarn install RUN yarn build RUN yarn start for a nestJS project, It compiles but does not take the enviroments: Error: Config validation error: "FIREBASE_CREDENCIAL" is required. and that happens with all the variables
Solution:
you want CMD yarn start not RUN yarn start
Jump to solution
7 Replies
Percy
Percy14mo ago
Project ID: 10f0b1b3-7ce4-433b-b063-ce6d3561795d
camilo
camilo14mo ago
10f0b1b3-7ce4-433b-b063-ce6d3561795d
Brody
Brody14mo ago
oh I see what you did
Solution
Brody
Brody14mo ago
you want CMD yarn start not RUN yarn start
Brody
Brody14mo ago
@Vin hehe
camilo
camilo14mo ago
It works, than u
Brody
Brody14mo ago
no problem!
Want results from more Discord servers?
Add your server
More Posts