forked from Chlumsky/msdfgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (31 loc) · 903 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
##
## Stage 1 - Compile golang code
##
ARG TAG=latest
FROM ubuntu:disco as build
# Create app directory
WORKDIR /usr/src/app
# Some basic utilities
RUN apt-get -y update && apt-get -y install cmake g++ libfreetype6-dev
# Bring in dockerize
COPY --from=propellerfactory/dockerize /dockerize /dockerize
# Bring in the source
COPY . ./
# Build the executable
RUN cmake . && cmake --build .
# Figure out the shared library dependencies
RUN /dockerize ./msdfgen
# Make an empty directory
RUN mkdir /empty
##
## Stage 2 - The deployment container
##
FROM scratch as deploy
WORKDIR /
COPY --from=build /empty /tmp/
COPY --from=build /usr/src/app/msdfgen /msdfgen
COPY --from=build /usr/src/app/libmsdfgen.a /libmsdfgen.a
COPY --from=build /usr/src/app/msdfgen.h /msdfgen.h
COPY --from=build /usr/src/app/core/*.h /core/
COPY --from=build /usr/src/app/libs /
COPY --from=build /usr/src/app/libs /libs/