-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (57 loc) · 2.73 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM debian:sid
MAINTAINER Sam Artuso <sam@highoctanedev.co.uk>
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git wget bzip2 unzip && \
>&2 echo '################################' && \
>&2 echo '### Installing emscripten... ###' && \
>&2 echo '################################' && \
apt-get install -y build-essential make cmake python2.7 nodejs npm default-jre && \
cd /usr/bin && ln -s ./nodejs ./node && \
cd /opt && \
wget --quiet 'https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz' && \
tar -xf emsdk-portable.tar.gz && \
rm -f emsdk-portable.tar.gz && \
cd emsdk_portable && \
./emsdk update && \
./emsdk install --build=MinSizeRel --shallow latest && \
./emsdk activate --build=MinSizeRel latest && \
./emsdk construct_env && \
. ./emsdk_set_env.sh && \
echo '. /opt/emsdk_portable/emsdk_set_env.sh' >> /root/.bashrc && \
cd /opt && \
ln -s /root/.emscripten . && \
ln -s /root/.emscripten_cache . && \
apt-get remove --purge -y build-essential cmake && \
>&2 echo '#############################' && \
>&2 echo '### Testing emscripten... ###' && \
>&2 echo '#############################' && \
emcc --version && \
cd /opt/emsdk_portable && \
emcc emscripten/master/tests/hello_world.cpp && \
rm -f ./a.out.js && \
>&2 echo '################################' && \
>&2 echo '### Installing OwlProgram... ###' && \
>&2 echo '################################' && \
cd /opt && \
git clone --depth=1 https://github.com/pingdynasty/OwlProgram.git OwlProgram.online && \
>&2 echo '##################################' && \
>&2 echo '### Installing ARM compiler... ###' && \
>&2 echo '##################################' && \
cd /opt/OwlProgram.online/Tools && \
npm install uglifyjs && \
apt-get install -y lib32z1 lib32ncurses5 && \
apt-get autoremove -y && \
wget --quiet 'https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2' && \
tar -xf gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2 && \
rm -f gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2 && \
>&2 echo '####################################' && \
>&2 echo '### Installing FirmwareSender... ###' && \
>&2 echo '####################################' && \
cd /opt/OwlProgram.online/Tools && \
wget --quiet https://github.com/pingdynasty/FirmwareSender/releases/download/v0.1/FirmwareSender-linux64.zip && \
unzip FirmwareSender-linux64.zip && \
rm -f FirmwareSender-linux64.zip
ENV EM_CACHE /opt/.emscripten_cache
ENV EM_CONFIG /opt/.emscripten
ENV PATH "$PATH:/opt/emsdk_portable/emscripten/master"