-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.it-runtime
More file actions
31 lines (26 loc) · 1.07 KB
/
Copy pathDockerfile.it-runtime
File metadata and controls
31 lines (26 loc) · 1.07 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
# Slim IT runtime image that packages a host-built `mega2` binary.
# Prefer this in CI after `cargo build -p mega2` to avoid a second full
# compile inside Docker. Context = mega2 repo root.
#
# Host/CI binaries are typically linked against a newer glibc than Debian
# bookworm; use Ubuntu 24.04 to match `ubuntu-latest` runners and modern
# desktops. (The source `Dockerfile` still builds+runs on bookworm.)
#
# cp target/debug/mega2 ./mega2.itbin # or target/release/...
# docker build -f Dockerfile.it-runtime -t mega2:local .
# rm -f ./mega2.itbin
FROM ubuntu:24.04
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
libssl3t64 \
&& rm -rf /var/lib/apt/lists/*
COPY mega2.itbin /usr/local/bin/mega2
COPY config/config.toml /etc/mega2/config.toml
RUN chmod 755 /usr/local/bin/mega2
ENV MEGA_BASE_DIR=/var/lib/mega2 \
MEGA_CONFIG=/etc/mega2/config.toml
EXPOSE 8000
ENTRYPOINT ["/usr/local/bin/mega2"]
CMD ["--config", "/etc/mega2/config.toml", "service", "http", "--host", "0.0.0.0", "-p", "8000"]