-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
51 lines (31 loc) · 1.06 KB
/
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
## Build
FROM golang:1.18-alpine AS build
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o server
## Dev
FROM build AS dev
RUN apk add --no-cache build-base ccls py3-lsp-server curl openjdk17 py-pip
RUN pip install pyflakes rope --ignore-installed
WORKDIR /jdt
RUN curl https://download.eclipse.org/jdtls/milestones/1.9.0/jdt-language-server-1.9.0-202203031534.tar.gz --output jdt.tar.gz
RUN tar -xvf ./jdt.tar.gz
WORKDIR /app
RUN apk add --no-cache make
RUN go install github.com/cespare/reflex@latest
ENTRYPOINT ["./entry.sh"]
CMD ["make watch"]
## Prod
FROM alpine:latest AS prod
RUN apk add --no-cache build-base ccls py3-lsp-server curl openjdk17 py-pip
RUN pip install pyflakes rope --ignore-installed
WORKDIR /jdt
RUN curl https://download.eclipse.org/jdtls/milestones/1.9.0/jdt-language-server-1.9.0-202203031534.tar.gz --output jdt.tar.gz
RUN tar -xvf ./jdt.tar.gz
WORKDIR /
COPY --from=build /app/server /app/entry.sh /app/.env ./
COPY --from=build /app/player_code ./player_code/
ENTRYPOINT ["/entry.sh"]
CMD ["./server"]