sheharyarn / cloudup.dev

Tools to jump-start development on the Cloud ☁️
https://cloudup.dev
106 stars 11 forks source link

Redundant WORKDIR in Dockerfile #13

Closed am-nimrah closed 10 months ago

am-nimrah commented 10 months ago

In the first stage of the Dockerfile, the WORKDIR /build is set but not used later in the commands. Consider evaluating whether it is necessary or if it can be omitted to enhance clarity.

sheharyarn commented 10 months ago

I'm assuming you're talking about the Dockerfile for Phoenix apps, as that's where we aare using WORKDIR /build in the first stage.

But this is used later when copying the compiled app in the final stage:

https://github.com/sheharyarn/cloudup.dev/blob/f670749cb8d80e74de856d2998f50f273f75d2c9/content/docker/elixir/phoenix/dockerfile#L81

Please clarify if I misunderstood.