Skip to content

Commit 9533865

Browse files
committed
chore: update docker files to latest dev-stage
1 parent 1ea7eb9 commit 9533865

File tree

4 files changed

+37
-18
lines changed

4 files changed

+37
-18
lines changed

docker/base.Dockerfile

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM ubuntu:xenial
2-
RUN dpkg --add-architecture i386
3-
RUN apt-get update && apt-get install -y python3.5-dev:i386
4-
RUN apt-get install -f
1+
ARG BASE
2+
3+
FROM $BASE
4+
55

66
RUN apt-get update && apt-get install -y build-essential g++ cmake g++-multilib git
77
RUN apt-get install -f
@@ -19,4 +19,23 @@ RUN pip install ply
1919
RUN mkdir /root/sampgdk/build
2020
RUN cd /root/sampgdk/build && cmake .. -DSAMP_SDK_ROOT=/root/sampsdk -DSAMPGDK_STATIC=ON -DSAMPGDK_BUILD_AMALGAMATION=ON
2121
RUN cmake --build /root/sampgdk/build --config Release
22-
RUN cmake --build /root/sampgdk/build --config Release --target install
22+
RUN cmake --build /root/sampgdk/build --config Release --target install
23+
24+
RUN dpkg --add-architecture i386
25+
RUN apt-get update && apt-get install -y software-properties-common
26+
RUN add-apt-repository ppa:deadsnakes/ppa
27+
28+
RUN apt-get update && apt-get install -y python3.8-dev:i386 libpython3.8-dev:i386
29+
# RUN apt-get install -f
30+
31+
# RUN apt-get update && apt-get install -y wget
32+
33+
# RUN mkdir /root/python
34+
# RUN cd /root/python && wget https://github.com/python/cpython/archive/v3.8.3.tar.gz && tar xvf v3.8.3.tar.gz
35+
36+
37+
WORKDIR /usr/src/pysamp
38+
COPY . .
39+
40+
RUN [ "cmake", "./src", "-G", "Unix Makefiles", "-DSAMPSDK_DIR=/root/sampsdk", "-DSAMPGDK_DIR=/root/sampgdk", "-DCMAKE_BUILD_TYPE=Debug" ]
41+
CMD make; cp ./PySAMP.so /target/

docker/compile.Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

docker/make

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
docker build -f ./base.Dockerfile -t pysamp/base ../
2-
docker build -f ./compile.Dockerfile -t pysamp/compile ../
3-
docker run -v "$(cd ../ && pwd)"/target:/target --rm pysamp/compile
1+
2+
docker build -f ./base.Dockerfile -t pysamp/bionic --build-arg BASE=ubuntu:bionic ../
3+
#docker build -f ./base.Dockerfile -t pysamp/eoan --build-arg BASE=ubuntu:eoan ../
4+
#docker build -f ./base.Dockerfile -t pysamp/focal --build-arg BASE=ubuntu:focal ../
5+
6+
#docker build -f ./base.Dockerfile -t pysamp/stretch --build-arg BASE=debian:stretch ../
7+
#docker build -f ./base.Dockerfile -t pysamp/buster --build-arg BASE=debian:buster ../
8+
9+
docker run -v "$(cd ../ && pwd)"/target:/target --rm pysamp/stretch

src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ project(PySAMP)
33
add_compile_options(-std=c++11)
44

55

6-
cmake_minimum_required(VERSION 3.12)
6+
cmake_minimum_required(VERSION 3.7)
77
list(APPEND CMAKE_MODULE_PATH ${SAMPGDK_DIR}/cmake)
88

99
add_compile_options(-std=c++11)
10-
set(PYTHON_MIN_VERSION "3.5.2")
10+
set(PYTHON_MIN_VERSION "3.5")
1111

12-
find_package (Python ${PYTHON_MIN_VERSION})
13-
find_package (PythonLibs ${PYTHON_MIN_VERSION})
12+
find_package (PythonInterp ${PYTHON_MIN_VERSION} REQUIRED)
13+
find_package (PythonLibs ${PYTHON_MIN_VERSION} REQUIRED)
1414

1515
find_library (SAMPGDK_LIBRARY
1616
NAMES sampgdk sampgdk4s

0 commit comments

Comments
 (0)