ci: finally fix docker build (#84)
This commit is contained in:
parent
2bf8ae8993
commit
a801aaf6c7
1 changed files with 8 additions and 2 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -14,8 +14,10 @@ ARG USE_EDGE=false
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
RUN if [ "$USE_EDGE" = "true" ]; then \
|
RUN if [ "$USE_EDGE" = "true" ]; then \
|
||||||
|
apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
|
||||||
npm ci --only=production --ignore-scripts && \
|
npm ci --only=production --ignore-scripts && \
|
||||||
npm install --save-exact github:pedroslopez/whatsapp-web.js#main; \
|
npm install --save-exact git+https://github.com/pedroslopez/whatsapp-web.js.git#main && \
|
||||||
|
apt-get purge -y git ca-certificates && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*; \
|
||||||
else \
|
else \
|
||||||
npm ci --only=production --ignore-scripts; \
|
npm ci --only=production --ignore-scripts; \
|
||||||
fi
|
fi
|
||||||
|
|
@ -34,9 +36,13 @@ RUN apt-get update && \
|
||||||
|
|
||||||
# Copy only production dependencies from deps stage
|
# Copy only production dependencies from deps stage
|
||||||
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
||||||
|
COPY --from=deps /usr/src/app/package*.json ./
|
||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
COPY . .
|
COPY server.js ./
|
||||||
|
COPY LICENSE ./
|
||||||
|
COPY swagger.json ./
|
||||||
|
COPY src/ ./src/
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue