forked from aquasecurity/postee
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ui
More file actions
36 lines (27 loc) · 738 Bytes
/
Dockerfile.ui
File metadata and controls
36 lines (27 loc) · 738 Bytes
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
FROM node:alpine3.15 as vuebuilder
COPY ./ui/frontend /frontend
WORKDIR /frontend
RUN yarn install
RUN yarn build
FROM golang:1.18-alpine as gobuilder
COPY . /server
WORKDIR /server/ui/backend
RUN apk add git
RUN go build -o posteeui
FROM alpine:3.16.2
EXPOSE 8001
RUN mkdir /uiserver
RUN mkdir /uiserver/www
RUN mkdir /server
RUN mkdir /server/database
RUN mkdir /config
COPY --from=gobuilder /server/ui/backend/posteeui /uiserver
COPY --from=vuebuilder /frontend/dist /uiserver/www
WORKDIR /uiserver
RUN addgroup -g 1099 postee
RUN adduser -D -g '' -G postee -u 1099 postee
RUN chown -R postee:postee /server
RUN chown -R postee:postee /config
RUN chown -R postee:postee /uiserver
USER postee
ENTRYPOINT ["/uiserver/posteeui"]