forked from Zeldazackman/Core-Station2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] docker file and version update (CHOMPStation2#9710)
Co-authored-by: Kashargul <[email protected]>
- Loading branch information
1 parent
f3e348b
commit 3f6c0f4
Showing
4 changed files
with
62 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,79 @@ | ||
FROM i386/ubuntu:xenial as base | ||
|
||
ARG BYOND_MAJOR=515 | ||
ARG BYOND_MINOR=1640 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
curl \ | ||
unzip \ | ||
make \ | ||
libstdc++6 \ | ||
&& curl "https://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip \ | ||
&& unzip byond.zip \ | ||
&& cd byond \ | ||
&& sed -i 's|install:|&\n\tmkdir -p $(MAN_DIR)/man6|' Makefile \ | ||
&& make install \ | ||
&& chmod 644 /usr/local/byond/man/man6/* \ | ||
&& apt-get purge -y --auto-remove curl unzip make \ | ||
&& cd .. \ | ||
&& rm -rf byond byond.zip /var/lib/apt/lists/* | ||
|
||
FROM base as rust_g | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
ca-certificates | ||
FROM ubuntu:22.04 AS base | ||
|
||
WORKDIR /rust_g | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates | ||
|
||
FROM base AS byond | ||
WORKDIR /byond | ||
|
||
RUN apt-get install -y --no-install-recommends \ | ||
libssl-dev \ | ||
pkg-config \ | ||
curl \ | ||
gcc-multilib \ | ||
&& curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host i686-unknown-linux-gnu \ | ||
&& git init \ | ||
&& git remote add origin https://github.com/tgstation/rust-g | ||
curl \ | ||
unzip \ | ||
make \ | ||
libstdc++6:i386 | ||
|
||
COPY dependencies.sh . | ||
|
||
RUN /bin/bash -c "source dependencies.sh \ | ||
&& git fetch --depth 1 origin \$RUST_G_VERSION" \ | ||
&& git checkout FETCH_HEAD \ | ||
&& ~/.cargo/bin/cargo build --release | ||
RUN . ./dependencies.sh \ | ||
&& curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip \ | ||
&& unzip byond.zip \ | ||
&& cd byond \ | ||
&& sed -i 's|install:|&\n\tmkdir -p $(MAN_DIR)/man6|' Makefile \ | ||
&& make install \ | ||
&& chmod 644 /usr/local/byond/man/man6/* \ | ||
&& apt-get purge -y --auto-remove curl unzip make \ | ||
&& cd .. \ | ||
&& rm -rf byond byond.zip | ||
|
||
FROM base as dm_base | ||
FROM byond AS build | ||
|
||
WORKDIR /vorestation | ||
|
||
FROM dm_base as build | ||
RUN apt-get install -y --no-install-recommends \ | ||
curl | ||
|
||
COPY . . | ||
|
||
RUN DreamMaker -max_errors 0 vorestation.dme | ||
RUN env TG_BOOTSTRAP_NODE_LINUX=1 tools/build/build | ||
|
||
FROM dm_base | ||
FROM base AS rust | ||
RUN apt-get install -y --no-install-recommends \ | ||
curl && \ | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal \ | ||
&& ~/.cargo/bin/rustup target add i686-unknown-linux-gnu | ||
|
||
EXPOSE 2303 | ||
FROM rust AS rust_g | ||
WORKDIR /rust_g | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends software-properties-common \ | ||
&& add-apt-repository ppa:ubuntu-toolchain-r/test \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get dist-upgrade -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libmariadb2 \ | ||
mariadb-client \ | ||
libssl1.0.0 \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir -p /root/.byond/bin | ||
RUN apt-get install -y --no-install-recommends \ | ||
libssl3 \ | ||
gcc-multilib \ | ||
git \ | ||
&& git init \ | ||
&& git remote add origin https://github.com/tgstation/rust-g | ||
|
||
COPY dependencies.sh . | ||
|
||
RUN . ./dependencies.sh \ | ||
&& git fetch --depth 1 origin "${RUST_G_VERSION}" \ | ||
&& git checkout FETCH_HEAD \ | ||
&& env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --release --target i686-unknown-linux-gnu --features all | ||
|
||
FROM byond | ||
WORKDIR /vorestation | ||
|
||
RUN apt-get install -y --no-install-recommends \ | ||
libssl3 \ | ||
zlib1g:i386 | ||
|
||
COPY --from=build /vorestation/ ./ | ||
COPY --from=rust_g /rust_g/target/release/librust_g.so ./librust_g.so | ||
COPY --from=rust_g /rust_g/target/i686-unknown-linux-gnu/release/librust_g.so ./librust_g.so | ||
|
||
#VOLUME [ "/vorestation/config", "/vorestation/data" ] | ||
|
||
ENTRYPOINT [ "DreamDaemon", "vorestation.dmb", "-port", "2303", "-trusted", "-close", "-verbose" ] | ||
EXPOSE 2303 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters