-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.archlinux
33 lines (23 loc) · 1.01 KB
/
Dockerfile.archlinux
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
FROM archlinux AS builder
WORKDIR /app
COPY ./ ./
RUN pacman-key --init
RUN pacman --noconfirm -Syu
RUN pacman --noconfirm -S openssl pkgconf opencv vtk hdf5 qt5-base glew tesseract clang rustup sqlite
RUN rustup toolchain install stable
ENV DATABASE_URL=sqlite:token.db
RUN sqlite3 token.db < migrations/20210525000135_table.sql
RUN mkdir -p /app/bin
RUN cargo build --release -p lofigirl_client --features standalone
RUN mv ./target/release/lofigirl_client /app/bin/lofigirl_client_standalone
RUN cargo build --release -p lofigirl_client -p lofigirl_server
RUN mv ./target/release/lofigirl_client /app/bin/
RUN mv ./target/release/lofigirl_server /app/bin/
FROM archlinux as runner
COPY --from=builder /app/bin/lofigirl_client /usr/bin/
COPY --from=builder /app/bin/lofigirl_server /usr/bin/
COPY --from=builder /app/bin/lofigirl_client_standalone /usr/bin/
RUN pacman-key --init
RUN pacman --noconfirm -Syu
RUN pacman --noconfirm -S opencv vtk hdf5 qt5-base glew tesseract tesseract-data-eng
ENTRYPOINT [ "lofigirl_server" ]