Kong build fails

Summary

The builds were successful until this time. Not sure what happened, this time this is failing.

Apparently, the build succeeds on my Mac! The problem occurs when I run it on the server.

Kong build fails with this message:

cp: can't stat 'kong/vendor/classic.lua': No such file or directory

Error: Build error: Failed installing kong/vendor/classic.lua in /usr/local/lib/luarocks/rocks-5.1/kong/0.14.1-0/lua/kong/vendor/classic.lua: Failed copying k
ong/vendor/classic.lua to /usr/local/lib/luarocks/rocks-5.1/kong/0.14.1-0/lua/kong/vendor/classic.lua

Steps To Reproduce

  1. Docker build
FROM alpine:3.6

ENV KONG_VERSION 0.14.1

RUN apk update

RUN apk add --no-cache --virtual .build-deps \
    alpine-sdk \
    wget \
    tar \
    ca-certificates

RUN apk add --no-cache \
    libgcc \
    openssl \
    pcre \
    perl \
    tzdata \
    curl \
    pcre-dev \
    openssl-dev \
    unzip

RUN wget https://openresty.org/download/openresty-1.13.6.2.tar.gz \
    && tar -xvf openresty-1.13.6.2.tar.gz \
    && cd openresty-1.13.6.2 \
    && ./configure \
        --with-pcre-jit \
        --with-ipv6 \
        --with-http_realip_module \
        --with-http_ssl_module \
        --with-http_stub_status_module \
        --with-http_v2_module \
        --with-pcre-jit --with-ipv6 \
        --with-cc-opt="-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/" \
        --with-ld-opt="-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/" \
    && make \
    && sudo make install

ENV PATH="$PATH:/usr/local/openresty/bin"

RUN wget http://luarocks.github.io/luarocks/releases/luarocks-3.0.1.tar.gz \
    && tar -xvf luarocks-3.0.1.tar.gz \
    && cd luarocks-3.0.1 \
    && ./configure \
        --lua-suffix=jit \
        --with-lua=/usr/local/openresty/luajit \
        --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \
    && make build \
    && sudo make install

COPY . /kong

WORKDIR /kong

RUN make dev

Additional Details & Logs

Honestly could just be a blip in your build? Does this happen every single build? Have you tried using one of the Kong standard Docker repo’s for your build as opposed to a highly customized one:

Hi @jeremyjpj0916

Thanks for taking a look at my post and sorry for my super late reply!

I eventually migrated to Kong’s official build and I’m no longer using my highly customized one :grinning:

1 Like