Browse Source

Add dockerfile to build ubuntu version

David Kennedy S. A 3 years ago
parent
commit
9142a096df
2 changed files with 40 additions and 0 deletions
  1. 31
    0
      Dockerfile
  2. 9
    0
      README.md

+ 31
- 0
Dockerfile View File

@@ -0,0 +1,31 @@
1
+from ubuntu:latest
2
+
3
+WORKDIR /app
4
+
5
+RUN apt-get update; apt-get install -y \
6
+  build-essential \
7
+  cmake \
8
+  git-core \
9
+  libboost-all-dev \
10
+  libglew-dev \
11
+  liblua5.1-0-dev \
12
+  libopenal-dev \
13
+  libphysfs-dev \
14
+  libssl-dev \
15
+  libvorbis-dev \
16
+  zlib1g-dev
17
+
18
+RUN apt-get install -y \
19
+  libncurses5-dev \
20
+  mercurial; \
21
+  hg clone -r stable-2.0 http://hg.icculus.org/icculus/physfs/; \
22
+    cd physfs; \
23
+    mkdir build && cd build && cmake .. && make && make install; \
24
+    mv /usr/local/lib/libphysfs.a /usr/lib/x86_64-linux-gnu/.
25
+
26
+ADD . /app
27
+
28
+# Build application
29
+RUN mkdir -p build && cd build && cmake .. && make -j$(grep -c ^process /proc/cpuinfo); 
30
+
31
+CMD cd build; ./otclient 

+ 9
- 0
README.md View File

@@ -36,6 +36,15 @@ In short, if you need to compile OTClient, follow these tutorials:
36 36
 * [Compiling on Linux](https://github.com/edubart/otclient/wiki/Compiling-on-Linux)
37 37
 * [Compiling on OS X](https://github.com/edubart/otclient/wiki/Compiling-on-Mac-OS-X)
38 38
 
39
+### Build and run with Docker
40
+
41
+To build and run the client without copile by hand:
42
+```
43
+./build.sh
44
+./run.sh
45
+```
46
+
47
+The build step should be run just when something on implementation changes.
39 48
 
40 49
 ### Need help?
41 50
 

Loading…
Cancel
Save