Sign inSign up

mwaeckerlin/build

By mwaeckerlin

•Updated 1 day ago

Basic Build Image — NOT FOR DEPLOYMENTS, use for build steps in Dockerfile

Image
0

2.0K

mwaeckerlin/build repository overview

⁠Build Environment

Docker image for generic build steps. Not for deployments — use this image only in build stages of a multi-stage Dockerfile.

The image is based on mwaeckerlin/very-base⁠ and includes often needed development tools.

⁠Security

The image uses a ${BUILD_USER} (coder) for building and a separate ${RUN_USER} for running the application, so the runtime user cannot overwrite files owned by the build user. Security is key. Additional useful variables are available from the upper base image mwaeckerlin/scratch⁠.

Trade-off: PATH contains the relative entries node_modules/.bin and /app/node_modules/.bin so that locally installed Node tools can be called directly in build steps. They are listed after the system paths, so a binary installed by an npm package can never shadow a system command.

⁠Example

Use as a build stage in a multi-stage Dockerfile:

FROM mwaeckerlin/build as build
ADD --chown=${BUILD_USER} . .
RUN make

FROM mwaeckerlin/scratch as production
COPY --from=build /app/output /app/output

See also: mwaeckerlin/nodejs-build⁠

Tag summary

Content type

Image

Digest

sha256:89d22b5e2…

Size

179.2 MB

Last updated

1 day ago

docker pull mwaeckerlin/build