This repository was archived by the owner on Jul 10, 2022. It is now read-only.
forked from RealDeviceMap/RealDeviceMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-debug
More file actions
46 lines (34 loc) · 1.36 KB
/
Dockerfile-debug
File metadata and controls
46 lines (34 loc) · 1.36 KB
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
## Base Image
FROM perfectlysoft/perfectassistant:4.1 AS base
# Perfect-COpenSSL
RUN apt-get -y update && apt-get install -y libssl-dev
# Perfect-libcurl
RUN apt-get -y update && apt-get install -y libcurl4-openssl-dev
# Perfect-mysqlclient-Linux
RUN apt-get -y update && apt-get install -y libmysqlclient-dev && sed -i -e 's/-fabi-version=2 -fno-omit-frame-pointer//g' /usr/lib/x86_64-linux-gnu/pkgconfig/mysqlclient.pc
# Perfect-LinuxBridge
RUN apt-get -y update && apt-get install -y uuid-dev && rm -rf /var/lib/apt/lists/*
# ImageMagick for creating raid images
RUN apt-get -y update && apt-get install -y imagemagick && cp /usr/bin/convert /usr/local/bin
# MySQL Client
RUN apt-get -y update && apt-get install -y mysql-client-5.7
## Build Image
FROM base AS build
WORKDIR /build
COPY Package.swift Package.swift
RUN swift package update
COPY .emptysources Sources
COPY .emptytests Tests
RUN swift build -c debug
RUN rm -rf Sources
COPY Sources Sources
COPY Tests Tests
RUN swift build -c debug
## Executable Image
FROM base
COPY --from=build /build/.build/debug/RealDeviceMap /app/RealDeviceMap
COPY resources /app/resources
RUN cd /app && wget https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal && chmod +x symbolicate-linux-fatal
COPY run-debug-docker /app/run-debug-docker
RUN cd /app && chmod +x run-debug-docker
CMD ["/app/run-debug-docker"]