You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
2.5 KiB

  1. FROM tgstation/byond:513.1514 as base
  2. FROM base as build_base
  3. RUN apt-get update \
  4. && apt-get install -y --no-install-recommends \
  5. git \
  6. ca-certificates
  7. FROM build_base as rust_g
  8. WORKDIR /rust_g
  9. RUN apt-get install -y --no-install-recommends \
  10. libssl-dev \
  11. pkg-config \
  12. curl \
  13. gcc-multilib \
  14. && curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host i686-unknown-linux-gnu \
  15. && git init \
  16. && git remote add origin https://github.com/tgstation/rust-g
  17. COPY dependencies.sh .
  18. RUN /bin/bash -c "source dependencies.sh \
  19. && git fetch --depth 1 origin \$RUST_G_VERSION" \
  20. && git checkout FETCH_HEAD \
  21. && ~/.cargo/bin/cargo build --release
  22. FROM build_base as bsql
  23. WORKDIR /bsql
  24. RUN apt-get install -y --no-install-recommends software-properties-common \
  25. && add-apt-repository ppa:ubuntu-toolchain-r/test \
  26. && apt-get update \
  27. && apt-get install -y --no-install-recommends \
  28. cmake \
  29. make \
  30. g++-7 \
  31. libmariadb-client-lgpl-dev \
  32. && git init \
  33. && git remote add origin https://github.com/tgstation/BSQL
  34. COPY dependencies.sh .
  35. RUN /bin/bash -c "source dependencies.sh \
  36. && git fetch --depth 1 origin \$BSQL_VERSION" \
  37. && git checkout FETCH_HEAD
  38. WORKDIR /bsql/artifacts
  39. ENV CC=gcc-7 CXX=g++-7
  40. RUN ln -s /usr/include/mariadb /usr/include/mysql \
  41. && ln -s /usr/lib/i386-linux-gnu /root/MariaDB \
  42. && cmake .. \
  43. && make
  44. FROM base as dm_base
  45. WORKDIR /tgstation
  46. FROM dm_base as build
  47. COPY . .
  48. RUN DreamMaker -max_errors 0 tgstation.dme && tools/deploy.sh /deploy
  49. FROM dm_base
  50. EXPOSE 1337
  51. RUN apt-get update \
  52. && apt-get install -y --no-install-recommends software-properties-common \
  53. && add-apt-repository ppa:ubuntu-toolchain-r/test \
  54. && apt-get update \
  55. && apt-get upgrade -y \
  56. && apt-get dist-upgrade -y \
  57. && apt-get install -y --no-install-recommends \
  58. libmariadb2 \
  59. mariadb-client \
  60. libssl1.0.0 \
  61. && rm -rf /var/lib/apt/lists/* \
  62. && mkdir -p /root/.byond/bin
  63. COPY --from=rust_g /rust_g/target/release/librust_g.so /root/.byond/bin/rust_g
  64. COPY --from=bsql /bsql/artifacts/src/BSQL/libBSQL.so ./
  65. COPY --from=build /deploy ./
  66. #bsql fexists memes
  67. RUN ln -s /tgstation/libBSQL.so /root/.byond/bin/libBSQL.so
  68. VOLUME [ "/tgstation/config", "/tgstation/data" ]
  69. ENTRYPOINT [ "DreamDaemon", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]