Slimmed down the final image (37MB -> 21.7MB, 42% smaller)
A migration to CircleCI 2.0 is needed because of the introduction of test image. The test image has to be based off of production image to actually test production code. Since production image name is generated we need to make it available in the test image dockerfile. For that we have to use the ARG directive. This feature is supported in Docker 17.06. CircleCI 1.0 runs Docker 1.8.2. CircleCI 2.0 with docker executor runs 17.03. That's why we have to use machine executor with a newer image.
A migration to CircleCI 2.0 is needed because of the introduction of test image. The test image has to be based off of production image to actually test production code. Since production image name is generated we need to make it available in the test image dockerfile. For that we have to use the
ARG
directive. This feature is supported in Docker 17.06. CircleCI 1.0 runs Docker 1.8.2. CircleCI 2.0 with docker executor runs 17.03. That's why we have to use machine executor with a newer image.