2018-04-18 14:09:48 +00:00
|
|
|
FROM ubuntu
|
|
|
|
|
|
|
|
# Need to install GCC-MULTILIB to be able to run amxxpc
|
|
|
|
RUN apt-get update && apt-get upgrade -y
|
2018-04-18 19:28:33 +00:00
|
|
|
RUN apt-get install -y wget git vim curl ca-certificates gcc-multilib hashalot unzip zip
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-18 19:28:33 +00:00
|
|
|
RUN useradd -m amxx && mkdir -p /var/build/pkg && chown -R amxx:amxx /var/build
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-28 03:48:46 +00:00
|
|
|
# Some paths
|
|
|
|
# /home/amxx/build - temporary copy
|
|
|
|
# /home/amxx/builD/base - Base AMXX files, not all included
|
|
|
|
# /home/amxx/build/pkg - result package
|
|
|
|
# /var/build - final product, mounted volume and copied on start
|
|
|
|
|
2018-04-18 14:09:48 +00:00
|
|
|
USER amxx
|
2018-04-28 03:48:46 +00:00
|
|
|
|
|
|
|
RUN mkdir -p /home/amxx/build/base /home/amxx/build/pkg /var/build
|
|
|
|
WORKDIR /home/amxx/build/base/
|
|
|
|
|
|
|
|
# Get all files and SHA-checkthem
|
2018-04-18 14:09:48 +00:00
|
|
|
RUN wget -q -O amxx.tgz "https://www.amxmodx.org/release/amxmodx-1.8.2-base-linux.tar.gz" && \
|
2018-04-18 18:31:18 +00:00
|
|
|
wget -q -O amxx_ns.tgz "https://www.amxmodx.org/release/amxmodx-1.8.2-ns-linux.tar.gz" && \
|
2018-04-18 19:28:33 +00:00
|
|
|
wget -q -O amxx.zip "https://www.amxmodx.org/release/amxmodx-1.8.2-base-windows.zip" && \
|
2018-04-28 03:48:46 +00:00
|
|
|
wget -q -O amxx_ns.zip "https://www.amxmodx.org/release/amxmodx-1.8.2-ns-windows.zip"
|
|
|
|
RUN wget -q -O mm.zip "https://www.amxmodx.org/release/metamod-1.21.1-am.zip"
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-28 03:48:46 +00:00
|
|
|
COPY files/amxmodx.sha /home/amxx/base/
|
|
|
|
# RUN sha256sum -c amxmodx.sha
|
|
|
|
# RUN sha256sum *.gz *.zip > /home/amxx/build/shasums
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-28 03:48:46 +00:00
|
|
|
# Extract all package
|
|
|
|
RUN yes|unzip -o amxx.zip && \
|
|
|
|
yes|unzip -o amxx_ns.zip && \
|
2018-04-28 18:15:29 +00:00
|
|
|
yes|unzip -o mm.zip && \
|
2018-04-28 03:48:46 +00:00
|
|
|
tar -zxf amxx.tgz && \
|
|
|
|
tar -zxf amxx_ns.tgz
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-28 03:48:46 +00:00
|
|
|
# Copy build script, all AMXX source files and include files
|
|
|
|
COPY src/*.sma /home/amxx/build/base/addons/amxmodx/scripting/
|
|
|
|
COPY src/include/* /home/amxx/build/base/addons/amxmodx/scripting/include
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-28 03:48:46 +00:00
|
|
|
WORKDIR /home/amxx/build/base/addons/amxmodx/scripting
|
2018-04-30 04:45:44 +00:00
|
|
|
|
|
|
|
RUN mkdir -p /home/amxx/build/pkg/addons/amxmodx/plugins && \
|
|
|
|
mkdir -p /home/amxx/build/pkg/addons/amxmodx/modules && \
|
2018-04-29 19:26:48 +00:00
|
|
|
./amxxpc ENSL.sma && \
|
2018-04-28 18:15:29 +00:00
|
|
|
./amxxpc extralevels3.sma && \
|
2018-04-29 19:26:48 +00:00
|
|
|
./amxxpc hiveccstatus.sma && \
|
|
|
|
cp *.amxx /home/amxx/build/base/addons/amxmodx/plugins/ && \
|
|
|
|
cp *.amxx /home/amxx/build
|
2018-04-28 03:48:46 +00:00
|
|
|
|
|
|
|
WORKDIR /home/amxx/build
|
2018-04-18 14:09:48 +00:00
|
|
|
|
2018-04-28 03:48:46 +00:00
|
|
|
# Then just copy the files we need. No extra.
|
2018-04-30 04:45:44 +00:00
|
|
|
RUN cp -rav base/addons/metamod pkg/addons/ && \
|
|
|
|
cp -rav base/addons/amxmodx/modules pkg/addons/amxmodx/ && \
|
|
|
|
cp -rav base/addons/amxmodx/plugins pkg/addons/amxmodx/ && \
|
|
|
|
cp -rav base/addons/amxmodx/data pkg/addons/amxmodx/ && \
|
|
|
|
cp -rav base/addons/amxmodx/dlls pkg/addons/amxmodx/ && \
|
|
|
|
cp -rav base/addons/amxmodx/configs pkg/addons/amxmodx/
|
2018-04-28 03:48:46 +00:00
|
|
|
|
2018-04-28 04:56:35 +00:00
|
|
|
# Copy ENSL to its place, add overlay files and zip the whole thing
|
|
|
|
RUN cp ENSL.amxx pkg/addons/amxmodx/plugins/
|
2018-04-28 03:48:46 +00:00
|
|
|
ADD pkg /home/amxx/build/pkg
|
|
|
|
|
2018-04-28 04:56:35 +00:00
|
|
|
RUN cd pkg && zip -9 -r ENSL_SrvPkg.zip * && mv ENSL_SrvPkg.zip ..
|
2018-04-28 03:48:46 +00:00
|
|
|
|
|
|
|
COPY build.sh /home/amxx/
|
|
|
|
|
|
|
|
USER root
|
|
|
|
ENTRYPOINT ["/home/amxx/build.sh"]
|