rabbitmq / erlang-rpm

Latest Erlang/OTP releases packaged as a zero dependency RPM, just enough for running RabbitMQ
https://rabbitmq.com/install-rpm.html
Other
552 stars 117 forks source link

Assorted Dockerfile improvements #37

Closed ncaio closed 7 years ago

ncaio commented 7 years ago

Dockerfile.template (_dockerfiletemp) - Corrections and handling Dockefile destination ($_docker_file)- Corrections and handling Shell script standard naming convention

Gsantomaggio commented 7 years ago

Hi @ncaio ! Thank you for your PR.

I left a couple of comments in the script.

There is another little improvement that you could do inside the last if You can directly pass the second parameter to docker build, docker just ignore it if does not exist . Something like:

docker_params=$2 #here you don't need "" for --no-cache parameter 
......

if [ -e "$docker_template" ]
then
        cp "$docker_template" "$docker_dir"/"$docker_file"
        sed -i 's/{centosfrom}/'$1'/g' "$docker_dir"/"$docker_file"
        sudo docker build $docker_params -t="erlang-rpm-build-""$centos_version" "$docker_dir"
fi

But it is not strictly necessary :)

Gsantomaggio commented 7 years ago

@ncaio Thank you

ncaio commented 7 years ago

you're welcome =]