Search code examples
node.jsdockerfileaerospike

./asinstall not found in while docker build using dockerfile?


I am trying to build docker image using docker file . The docker file will contain aerospike database creation.

RUN wget -O aerospike.tgz 'https://www.aerospike.com/download/server/latest/artifact/ubuntu18'
RUN tar -xvf aerospike.tgz
RUN cd aerospike-server-community-*-ubuntu18*
RUN ./asinstall


Solution

  • FROM ubuntu:18.04
    RUN apt-get update && apt-get install -q -y curl python2.7 python
    RUN TEMPDIR=$(mktemp -d) && \
        cd $TEMPDIR && \
        curl -L 'https://www.aerospike.com/download/server/latest/artifact/ubuntu18' | tar xzv --strip-components 1 && \
        ./asinstall && \
        cd / && \
        rm -rf $TEMPDIR
    

    seems to work.