forked from pacstall/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (30 loc) · 897 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
39
40
41
42
43
44
45
46
FROM node:lts-alpine AS client
ARG version='development'
WORKDIR /root/
COPY ./client ./client
COPY ./Makefile ./Makefile
RUN apk add --no-cache make
RUN echo -n "${version}" > VERSION
RUN cat VERSION
RUN make client/dist
FROM golang:1.18-alpine AS server
WORKDIR /root/
COPY ./server ./server
COPY ./Makefile ./Makefile
RUN apk add --no-cache make gcc musl-dev
RUN echo -n "${version}" > VERSION
RUN make server/dist
FROM debian:buster-slim
WORKDIR /root/
COPY --from=client /root/client/dist/ /root/client/dist/
COPY --from=server /root/server/dist/ /root/server/dist/
COPY ./Makefile ./Makefile
RUN apt update && apt install make git -y
RUN echo -n "${version}" > VERSION
RUN make dist \
&& rm -rf server \
&& rm -rf client
WORKDIR /root/dist/
RUN ls -al /root/dist
CMD [ "sh", "-c", "git clone https://github.com/pacstall/pacstall-programs && ./webserver" ]
EXPOSE 3300