Challenge Overview
Previously, we have create a Dockerfile for creating docker image for https://github.com/topcoder-platform/tc-database-scripts
Here, we'd like to simplify and improve the docker build.
1. Currently in Dockerfile, there are a lot of base setup steps which is not needed to redo again and again
So we'd like to extract them and build a separate base image for reuse.
1.1 Please create a base directory, and move all related files into that, and create a new Dockerfile to build the base image.
1.2 The current Dockerfile should be updated and build image from that base image, assuming it will be FROM appiriodevops/tc-database-scripts:base
1.3 Keep the image small, for steps like download a file, unzip it and rm the zip file should be group into one RUN command , for example,
So we'd like to know if it is possible to stop the build and populate the error. if not, please provide the reason.
- Verification Steps
Here, we'd like to simplify and improve the docker build.
1. Currently in Dockerfile, there are a lot of base setup steps which is not needed to redo again and again
So we'd like to extract them and build a separate base image for reuse.
1.1 Please create a base directory, and move all related files into that, and create a new Dockerfile to build the base image.
1.2 The current Dockerfile should be updated and build image from that base image, assuming it will be FROM appiriodevops/tc-database-scripts:base
1.3 Keep the image small, for steps like download a file, unzip it and rm the zip file should be group into one RUN command , for example,
RUN sudo wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.8-bin.tar.gz -O /apache-ant-1.9.8-bin.tar.gz RUN sudo tar -xzvf /apache-ant-1.9.8-bin.tar.gz -C /opt RUN sudo rm /apache-ant-1.9.8-bin.tar.gz2. The current build process is not stopped in any step, it that step failed, especially
RUN ./setup_tc_db.shyou can dev branch to reproduce the problem. Please also check https://circleci.com/gh/topcoder-platform/tc-database-scripts/12
So we'd like to know if it is possible to stop the build and populate the error. if not, please provide the reason.
Final Submission Guidelines
- Changes to improve the docker build- Verification Steps