title: Is there a more efficient way to dockerize Luarocks?
body: <p>I am trying to build a lean alpine docker container for unit testing Lua in Google Cloud Build.</p>
  
  <p>It runs fine, but takes about 30 - 50 seconds to build. When I run busted and luacheck, it only takes a few seconds for each. Any thoughts on how I could optimize this build process?</p>
  
  <p>I was using wget and then switched to git. I added curl and unzip since luarocks expects it and openssl for one of luacheck's dependencies. Are there different dependencies I could/should use?</p>
  
  <pre><code>FROM alpine
  
  ENV LUA_VERSION 5.1
  
  RUN apk update
  
  RUN apk add lua${LUA_VERSION} 
  RUN apk add lua${LUA_VERSION}-dev
  
  RUN apk add bash build-base curl git openssl unzip
  
  RUN cd /tmp &amp;&amp; \
      git clone https://github.com/keplerproject/luarocks.git &amp;&amp; \
      cd luarocks &amp;&amp; \
      sh ./configure &amp;&amp; \
      make build install &amp;&amp; \
      cd &amp;&amp; \
      rm -rf /tmp/luarocks
  
  RUN luarocks install busted
  RUN luarocks install luacheck
  RUN luarocks install luacov
  </code></pre>