chore: Dockerfile

This commit is contained in:
Davidson Gomes 2024-06-10 14:16:40 -03:00
parent 6d6f7293f9
commit 99ebb81838

View File

@ -1,10 +1,7 @@
FROM node:20-bullseye-slim AS base FROM node:20-alpine AS builder
RUN apt-get update -y && apt-get upgrade -y && \ RUN apk update && \
apt-get install -y git tzdata ffmpeg wget curl && \ apk add git ffmpeg wget curl bash
npm i -g npm@latest
FROM base AS builder
LABEL version="2.0.0" description="Api to control whatsapp features through http requests." LABEL version="2.0.0" description="Api to control whatsapp features through http requests."
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"
@ -24,13 +21,16 @@ COPY ./.env.example ./.env
COPY ./Docker ./Docker COPY ./Docker ./Docker
RUN chmod +x ./Docker/scripts/* RUN chmod +x ./Docker/scripts/* && dos2unix ./Docker/scripts/*
RUN ./Docker/scripts/generate_database.sh RUN ./Docker/scripts/generate_database.sh
RUN npm run build RUN npm run build
FROM base AS final FROM node:20-alpine AS final
RUN apk update && \
apk add tzdata ffmpeg
ENV TZ=America/Sao_Paulo ENV TZ=America/Sao_Paulo