-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 833 Bytes
/
Dockerfile
File metadata and controls
38 lines (29 loc) · 833 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
37
38
# build-go image
FROM golang:latest as build-go
WORKDIR /build
RUN apt-get update && apt-get install --assume-yes upx
COPY . /build
RUN make go-build
RUN upx --best --lzma coreapi
# build-cs-release image
FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-cs-release
WORKDIR /build
COPY . /build
RUN apt-get update && apt-get install --assume-yes make
RUN make cs-build-release
# Run image
FROM python:3
RUN apt update && \
apt install mono-complete -y
RUN mkdir /app
RUN mkdir /data
RUN mkdir /app/css
COPY --from=build-go /build/coreapi /app
COPY --from=build-go /build/start.sh /app
COPY --from=build-go /build/.env.example /data/.env
COPY --from=build-cs-release /build/cc /app/cc
# runtime params
WORKDIR /app
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
EXPOSE 8080
CMD ["/bin/sh", "start.sh"]