forked from Namaneo/Junie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (35 loc) · 827 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
47
48
49
50
51
52
53
54
55
56
57
58
# Build emulator
FROM debian AS app
WORKDIR /app
ENV HOME=/app
ENV TERM=vt100
RUN apt update
RUN apt install -y curl make clang wget git bsdmainutils
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz
RUN tar xvf wasi-sdk-14.0-linux.tar.gz
ADD ./app/ ./
RUN make
# Build API
FROM golang as api
WORKDIR /api
ADD ./api/go.mod ./
ADD ./api/go.sum ./
RUN go mod download
ADD ./api/ ./
RUN go build -o build/junie
# Build UI
FROM node:16 as ui
WORKDIR /ui
ADD ./ui/package.json ./
ADD ./ui/yarn.lock ./
RUN yarn install
ADD ./ui/ ./
RUN yarn ionic build
# Run Junie
FROM debian AS junie
WORKDIR /junie
COPY --from=api /api/build/ ./
COPY --from=app /app/build/ ./app/
COPY --from=ui /ui/build/ ./ui/
ADD ./assets/ ./assets/
ENTRYPOINT [ "./junie" ]