-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (35 loc) · 1.25 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
# ================================
# Build image
# ================================
FROM swift:5.5-xenial as builder
LABEL maintainer="julian.kahnert@worldiety.de"
WORKDIR /build-folder
RUN mkdir /builder-bins
RUN mkdir /builder-libs
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
apt-get -q update && apt-get -q dist-upgrade -y && \
apt-get install -y libsqlite3-dev
# Install chia
COPY . .
RUN swift build --configuration release && \
mv `swift build --configuration release --show-bin-path`/chia /builder-bins
# Install Swift Dependencies
## SwiftLint
RUN git clone https://github.com/realm/SwiftLint SwiftLint && \
cd SwiftLint && \
swift build --configuration release && \
mv `swift build --configuration release --show-bin-path`/swiftlint /builder-bins && \
cp /usr/lib/libsourcekitdInProc.so /builder-libs && \
cd /build-folder
# ================================
# Run image
# ================================
FROM swift:5.5-xenial-slim
LABEL maintainer="julian.kahnert@worldiety.de"
WORKDIR /project
VOLUME /project
COPY --from=builder /builder-bins /usr/bin/
COPY --from=builder /builder-libs /usr/lib/
# Install Linux Dependencies
RUN rm -rf /build-folder && rm -rf /var/lib/apt/lists/*
CMD chia