FROM alpine:3.7 ENV LUA_VERSION 5.3.3 ENV LUAROCKS_VERSION 2.4.2 RUN apk add --no-cache bc \ curl \ g++ \ gcc \ git \ loksh \ lua5.3-dev \ libssh-dev \ openssl-dev \ lua5.3 \ make \ perl \ unzip RUN ln -s /usr/bin/lua5.3 /usr/bin/lua && \ ln -s /usr/bin/luac5.3 /usr/bin/luac # RUN curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf - && \ # cd /lua-$LUA_VERSION && \ # make linux test && \ # make install && \ # cd .. && rm /lua-$LUA_VERSION -rf RUN curl -L http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERSION}.tar.gz | tar xzf - && \ cd /luarocks-$LUAROCKS_VERSION && \ ./configure && \ make build && \ make install && \ cd .. && rm -rf /lua-$LUAROCKS_VERSION RUN mkdir sgarest-daemon && \ curl -L https://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon/-/archive/master/sgarest-daemon-master.tar.gz | tar xzf - -C sgarest-daemon --strip-components 1 && \ cd sgarest-daemon && \ luarocks install lua-schema-scm-1.rockspec && \ luarocks make sga-daemon-scm-1.rockspec && \ luarocks make sga-driver-posix-scm-1.rockspec WORKDIR /sgad RUN mkdir projects && mkdir algorithms && mkdir logs RUN cp ../sgarest-daemon/collect_execution_data . RUN cp ../sgarest-daemon/flowmonitor . RUN rm -rf ../sgarest-daemon COPY sgad.sh . COPY sgad.cfg . VOLUME /sgad/projects VOLUME /sgad/algorithms VOLUME /sgad/logs ENTRYPOINT ["./sgad.sh"] # CMD ["sgad.cfg"]