Skip to content

Commit

Permalink
Move ARG used in FROM command to top of file (JahstreetOrg#9)
Browse files Browse the repository at this point in the history
https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
"FROM instructions support variables that are declared by any ARG instructions that occur before the first FROM."
  • Loading branch information
joseph-tatari authored Oct 8, 2021
1 parent 1fc40d8 commit 82b23ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spark/3.1.1_2.12-hadoop_3.2.0_cloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Builder Container
ARG LIVY_BUILDER_TAG=latest
ARG DD_TAG=latest

### Builder Container
FROM 878256633362.dkr.ecr.us-west-2.amazonaws.com/livy-builder:${LIVY_BUILDER_TAG} as build

ARG aws_bundle_version=1.11.1001
Expand All @@ -17,7 +19,6 @@ RUN cd / && \
cp spark-3.1.1-bin-hadoop-3.2.0-cloud-scala-2.12.tgz /

# Pull dd-spark-metrics image to get the JAR inside in a later COPY --from=metrics
ARG DD_TAG=latest
FROM 878256633362.dkr.ecr.us-west-2.amazonaws.com/dd-spark-metrics:${DD_TAG} as metrics

### Final Container
Expand Down

0 comments on commit 82b23ac

Please sign in to comment.