-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.arm
37 lines (35 loc) · 1.42 KB
/
Dockerfile.arm
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
# Worterbuch Dockerfile for ARMv6
#
# Copyright (C) 2024 Michael Bachmann
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
FROM --platform=linux/amd64 messense/rust-musl-cross:armv7-musleabihf AS worterbuch-builder-arm
WORKDIR /src/worterbuch
COPY . .
RUN cargo build -p worterbuch --release --no-default-features
FROM --platform=linux/arm scratch
WORKDIR /app
COPY --from=worterbuch-builder-arm /src/worterbuch/target/armv7-unknown-linux-musleabihf/release/worterbuch .
ENV RUST_LOG=info
ENV WORTERBUCH_WS_BIND_ADDRESS=0.0.0.0
ENV WORTERBUCH_TCP_BIND_ADDRESS=0.0.0.0
ENV WORTERBUCH_USE_PERSISTENCE=true
ENV WORTERBUCH_DATA_DIR=/data
ENV WORTERBUCH_PERSISTENCE_INTERVAL=5
ENV WORTERBUCH_WS_SERVER_PORT=80
ENV WORTERBUCH_TCP_SERVER_PORT=9090
ENV WORTERBUCH_SINGLE_THREADED=false
ENV WORTERBUCH_WEBAPP=false
VOLUME [ "/data" ]
CMD ["./worterbuch"]