Skip to content

Commit 112428d

Browse files
committed
ci: finally fix docker build
1 parent 2bf8ae8 commit 112428d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ ARG USE_EDGE=false
1414
COPY package*.json ./
1515

1616
RUN if [ "$USE_EDGE" = "true" ]; then \
17+
apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
1718
npm ci --only=production --ignore-scripts && \
18-
npm install --save-exact github:pedroslopez/whatsapp-web.js#main; \
19+
npm install --save-exact git+https://github.com/pedroslopez/whatsapp-web.js.git#main && \
20+
apt-get purge -y git ca-certificates && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*; \
1921
else \
2022
npm ci --only=production --ignore-scripts; \
2123
fi
@@ -34,9 +36,13 @@ RUN apt-get update && \
3436

3537
# Copy only production dependencies from deps stage
3638
COPY --from=deps /usr/src/app/node_modules ./node_modules
39+
COPY --from=deps /usr/src/app/package*.json ./
3740

3841
# Copy application code
39-
COPY . .
42+
COPY server.js ./
43+
COPY LICENSE ./
44+
COPY swagger.json ./
45+
COPY src/ ./src/
4046

4147
EXPOSE 3000
4248

0 commit comments

Comments
 (0)