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.
 
 
 
 
 
 

116 lines
2.9 KiB

  1. FROM tgstation/byond:512.1427 as base
  2. FROM base as rustg
  3. WORKDIR /rust_g
  4. RUN apt-get update && apt-get install -y \
  5. git \
  6. ca-certificates \
  7. libc6-dev
  8. FROM build as rust_g
  9. WORKDIR /rust_g
  10. RUN apt-get install -y --no-install-recommends \
  11. libssl-dev \
  12. rustc \
  13. cargo \
  14. pkg-config
  15. RUN git init \
  16. && git remote add origin https://github.com/tgstation/rust-g
  17. #TODO: find a way to read these from .travis.yml or a common source eventually
  18. ENV RUST_G_VERSION=0.3.0
  19. RUN git fetch --depth 1 origin $RUST_G_VERSION \
  20. && git checkout FETCH_HEAD \
  21. && cargo build --release
  22. FROM 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. libstdc++6 \
  32. libmariadb-client-lgpl-dev
  33. RUN git init \
  34. && git remote add origin https://github.com/tgstation/BSQL
  35. #TODO: find a way to read these from .travis.yml or a common source eventually
  36. ENV BSQL_VERSION=v1.3.0.2
  37. RUN git fetch --depth 1 origin $BSQL_VERSION \
  38. && git checkout FETCH_HEAD
  39. WORKDIR /bsql/artifacts
  40. ENV CC=gcc-7 CXX=g++-7
  41. RUN ln -s /usr/include/mariadb /usr/include/mysql \
  42. && ln -s /usr/lib/i386-linux-gnu /root/MariaDB \
  43. && cmake .. \
  44. && make
  45. FROM base as dm_base
  46. WORKDIR /tgstation
  47. FROM dm_base as build
  48. COPY . .
  49. RUN DreamMaker -max_errors 0 tgstation.dme
  50. WORKDIR /deploy
  51. RUN mkdir -p \
  52. .git/logs \
  53. _maps \
  54. config \
  55. icons/minimaps \
  56. sound/chatter \
  57. sound/voice/complionator \
  58. sound/instruments \
  59. strings \
  60. && cp /tgstation/tgstation.dmb /tgstation/tgstation.rsc ./ \
  61. && cp -r /tgstation/.git/logs/* .git/logs/ \
  62. && cp -r /tgstation/_maps/* _maps/ \
  63. && cp -r /tgstation/config/* config/ \
  64. && cp /tgstation/icons/default_title.dmi icons/ \
  65. && cp -r /tgstation/icons/minimaps/* icons/minimaps/ \
  66. && cp -r /tgstation/sound/chatter/* sound/chatter/ \
  67. && cp -r /tgstation/sound/voice/complionator/* sound/voice/complionator/ \
  68. && cp -r /tgstation/sound/instruments/* sound/instruments/ \
  69. && cp -r /tgstation/strings/* strings/
  70. FROM dm_base
  71. EXPOSE 1337
  72. RUN apt-get update && apt-get install -y \
  73. mariadb-client \
  74. libssl1.0.0 \
  75. && rm -rf /var/lib/apt/lists/* \
  76. && mkdir -p /root/.byond/bin
  77. COPY --from=rustg /rust_g/target/release/librust_g.so /root/.byond/bin/rust_g
  78. COPY --from=bsql /bsql/artifacts/src/BSQL/libBSQL.so ./
  79. COPY --from=build /deploy ./
  80. #bsql fexists memes
  81. RUN ln -s /tgstation/libBSQL.so /root/.byond/bin/libBSQL.so
  82. VOLUME [ "/tgstation/config", "/tgstation/data" ]
  83. ENTRYPOINT [ "DreamDaemon", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ]