Skip to content

Instantly share code, notes, and snippets.

@vlakam
Created March 18, 2019 16:48
Show Gist options
  • Save vlakam/a3e1a3d333876e5ef0143ccccac50006 to your computer and use it in GitHub Desktop.
Save vlakam/a3e1a3d333876e5ef0143ccccac50006 to your computer and use it in GitHub Desktop.
FROM arm64v8/ubuntu
RUN apt-get update
ARG LUA_VERSION=5.1
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y install libreadline-dev libssl-dev lua5.1 liblua5.1-dev git make unzip redis-server curl libcurl4-gnutls-dev wget && \
wget http://luarocks.org/releases/luarocks-2.2.2.tar.gz && \
tar zxpf luarocks-2.2.2.tar.gz && \
cd luarocks-2.2.2 && \
sh ./configure --lua-version=${LUA_VERSION} && \
make bootstrap
WORKDIR /srv/app
ARG DEPS_ROCKS="luasec luasocket redis-lua lua-term serpent lua-cjson"
RUN for ROCK in $DEPS_ROCKS; do luarocks install $ROCK; done
RUN ls /usr/include/aarch64-linux-gnu/ && ls /usr/include/aarch64-linux-gnu/curl
RUN luarocks install lua-curl CURL_INCDIR=/usr/include/aarch64-linux-gnu
COPY locales locales
COPY lua lua
COPY polling.lua .
ARG GB_COMMIT
ENV GB_COMMIT=$GB_COMMIT
CMD ["lua /srv/app/polling.lua"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment