|
1 |
| -FROM centos:8 as base |
| 1 | +FROM debian:bookworm-slim |
| 2 | + |
| 3 | +# Use ADD to avoid having to install curl |
| 4 | +ADD --chmod=644 https://github.com/MisterTea/debian-et/raw/master/et.gpg /etc/apt/trusted.gpg.d/et.gpg |
| 5 | + |
| 6 | +# Use a run cache to speed up rebuilding and avoid having to remove the cache when we're done |
| 7 | +RUN --mount=type=cache,mode=0755,target=/var/lib/apt/lists,sharing=locked \ |
| 8 | + --mount=type=cache,mode=0755,target=/var/cache/apt,sharing=locked \ |
| 9 | + rm -f /etc/apt/apt.conf.d/docker-clean && \ |
| 10 | + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache && \ |
| 11 | + apt-get update -qq && \ |
| 12 | + apt-get install -y ca-certificates && \ |
| 13 | + echo "deb https://github.com/MisterTea/debian-et/raw/master/debian-source/ bookworm main" > /etc/apt/sources.list.d/et.list && \ |
| 14 | + apt-get update -qq && \ |
| 15 | + apt-get install -y et openssh-server |
2 | 16 |
|
3 |
| -ENV BUILD_REPOS="epel-release centos-release-scl" \ |
4 |
| - BUILD_DEPS="cmake3 boost-devel libsodium-devel protobuf-devel \ |
5 |
| - protobuf-compiler gflags-devel protobuf-lite-devel git \ |
6 |
| - perl-IPC-Cmd perl-Data-Dumper libunwind-devel libutempter-devel \ |
7 |
| - devtoolset-11 devtoolset-11-libatomic-devel rh-git227" |
8 |
| - |
9 |
| - |
10 |
| -WORKDIR / |
11 |
| - |
12 |
| -RUN yum install -y $BUILD_REPOS && \ |
13 |
| - yum install -y $BUILD_DEPS && \ |
14 |
| - git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git && \ |
15 |
| - cd EternalTerminal && \ |
16 |
| - mkdir build && \ |
17 |
| - cd build && \ |
18 |
| - bash -c "scl enable devtoolset-11 rh-git227 'cmake3 ../'" && \ |
19 |
| - bash -c "scl enable devtoolset-11 'make -j $(grep ^processor /proc/cpuinfo |wc -l) && make install'" |
20 |
| - |
21 |
| -FROM centos:8 |
22 |
| - |
23 |
| -RUN yum install -y epel-release && \ |
24 |
| - yum install -y protobuf-lite libsodium openssh-server libatomic libunwind |
25 |
| - |
26 |
| -COPY --from=base /usr/bin/etserver /usr/bin/etterminal /usr/bin/htm /usr/bin/htmd /usr/bin/ |
27 |
| -COPY --from=base /EternalTerminal/etc/et.cfg /etc/et.cfg |
28 | 17 | COPY --chmod=755 container-entrypoint /bin/container-entrypoint
|
29 | 18 |
|
30 |
| -EXPOSE 2022 2222 |
31 |
| - |
32 | 19 | ENTRYPOINT ["/bin/container-entrypoint", "server"]
|
33 |
| - |
34 |
| -CMD ["--cfgfile=/etc/et.cfg"] |
0 commit comments