forked from ever-co/ever-traduora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (22 loc) · 907 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Build stage
FROM node:16-alpine3.11 as builder
LABEL maintainer="[email protected]"
ENV IS_DOCKER=true
RUN apk --update add bash && \
apk add --no-cache --virtual build-dependencies libgcc libstdc++ linux-headers dos2unix gcc g++ git make python2 py2-setuptools vips-dev
RUN npm install --quiet node-gyp -g
COPY wait docker-entrypoint.compose.sh docker-entrypoint.sh /
RUN chmod +x /wait /docker-entrypoint.compose.sh /docker-entrypoint.sh && dos2unix /docker-entrypoint.compose.sh && dos2unix /docker-entrypoint.sh
WORKDIR /opt/traduora
COPY bin bin
COPY api api
COPY webapp webapp
RUN dos2unix bin/* && chmod +x bin/*.sh
RUN bin/build.sh
# Runtime stage
FROM node:16-alpine3.11
WORKDIR /opt/traduora
COPY --from=builder /wait /docker-entrypoint.sh /docker-entrypoint.compose.sh ./
COPY --from=builder /opt/traduora/dist/ /opt/traduora/
EXPOSE 8080
ENTRYPOINT [ "./docker-entrypoint.sh" ]