forked from polonel/trudesk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (22 loc) · 828 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
FROM golang:alpine AS gcsfuse
RUN apk add --no-cache git
ENV GOPATH /go
RUN go get -u github.com/googlecloudplatform/gcsfuse
FROM node:12.22.1-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++ python
RUN yarn install --production=true
RUN npm rebuild bcrypt node-sass --build-from-source
RUN cp -R node_modules prod_node_modules
RUN yarn install --production=false
RUN yarn build
RUN rm -rf node_modules && mv prod_node_modules node_modules
FROM node:12.22.1-alpine
WORKDIR /usr/src/trudesk
RUN apk add --no-cache ca-certificates bash mongodb-tools fuse && 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" ]