-
-
Notifications
You must be signed in to change notification settings - Fork 454
/
Dockerfile
30 lines (23 loc) · 838 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
#FROM golang:1.17-alpine AS gcsfuse
#RUN apk add --no-cache git
#ENV GOPATH /go
#RUN go install github.com/googlecloudplatform/gcsfuse@latest
FROM node:16.14-alpine AS builder
RUN mkdir -p /usr/src/trudesk
WORKDIR /usr/src/trudesk
COPY . /usr/src/trudesk
RUN apk add --no-cache --update bash make gcc g++ python3
RUN yarn plugin import workspace-tools
RUN yarn workspaces focus --all --production
RUN cp -R node_modules prod_node_modules
RUN yarn install
RUN yarn build
RUN rm -rf node_modules && mv prod_node_modules node_modules
RUN rm -rf .yarn/cache
FROM node:16.14-alpine
WORKDIR /usr/src/trudesk
RUN apk add --no-cache ca-certificates bash mongodb-tools && rm -rf /tmp/*
COPY --from=builder /usr/src/trudesk .
#COPY --from=gcsfuse /go/bin/gcsfuse /usr/local/bin
EXPOSE 8118
CMD [ "/bin/bash", "/usr/src/trudesk/startup.sh" ]