Skip to content

rearchitect Docker build to use --target #1654

@megahirt

Description

@megahirt

Our current Dockerfile uses a build arg to create a fake-conditional in the Dockerfile to switch between production/development use cases. This is a hack at best and results in both sides of the conditional being build, regardless of the use case.

We can switch to using the --target flag e.g. docker build --target=production . and, if our Dockerfile has a proper multi-stage dependency graph isolated to the right target, we should not have the problems associated with the build arg hack.

Metadata

Metadata

Assignees

Labels

engineeringTasks which do not directly relate to a user-facing feature or fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions