1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [ENV](<https://delaparra-services.nl/knowledge-hub/env>)

  

Category: Docker 

# ENV

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is ENV?

 

ENV: Sets an environment variable baked into the image and present at runtime in every container. ` ENV ` sets an environment variable in a Docker image. It is available during the rest of the build and in every container started from the image, such as ` ENV APP_ENV=production `. Use it for defaults that belong to the image itself, like the runtime mode or a port number. Values can still be overridden when a container starts.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about ENV

  

### What should you keep in mind with ENV?

 

Do not put secrets in ` ENV `. They become part of the image, visible to anyone who can pull it or run ` docker inspect `. Passwords, API keys and tokens belong in environment variables set at runtime, by Compose, Kubernetes Secrets or your hosting platform. Keeping configuration outside the image also lets the same image run in test and production, which is the whole point of building it once.

    

### What does an example of ENV look like?

 

```
ENV NODE_ENV=production \ PORT=8080
```

 

## At a glance

   CategoryDocker Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Docker terms

 

- [digest](<https://delaparra-services.nl/knowledge-hub/digest>) 
- [Docker Hub](<https://delaparra-services.nl/knowledge-hub/docker-hub>) 
- [ENTRYPOINT](<https://delaparra-services.nl/knowledge-hub/entrypoint>) 
- [environment](<https://delaparra-services.nl/knowledge-hub/environment>) 
- [EXPOSE](<https://delaparra-services.nl/knowledge-hub/expose>) 
- [FROM](<https://delaparra-services.nl/knowledge-hub/from>)

 

[All terms starting with E](<https://delaparra-services.nl/knowledge-hub#letter-e>)

 

## Skills

 

- ### Laravel environment and config

 

Use when working with environment variables, .env files and configuration in a Laravel app - adding a new setting, APP\_KEY, database/mail/queue credentials, config caching, secrets in CI/CD or Docker, or debugging "env() returns null in production". Keeps secrets out of Git and config reads cache-safe.

 [View skill](<https://delaparra-services.nl/skills/laravel-env-config>) [Download zip](<https://delaparra-services.nl/skills/laravel-env-config/download>) 
- ### Docker Compose Patterns

 

Use this skill when creating, modifying, or debugging Docker Compose configurations, even if the user just says they need to wire services together, add a database to their stack, or set up a local development environment with multiple containers. Covers service definitions, health checks, dependency ordering, volumes, networks, environment variables, and development overrides.

 [View skill](<https://delaparra-services.nl/skills/docker-compose-patterns>) [Download zip](<https://delaparra-services.nl/skills/docker-compose-patterns/download>) 
- ### Secrets Management

 

Implement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.

 [View skill](<https://delaparra-services.nl/skills/secrets-management>) [Download zip](<https://delaparra-services.nl/skills/secrets-management/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/env/skills.zip>)

 

## Manuals

 

- [.env and environment variables](<https://delaparra-services.nl/manuals/env-en-omgevingsvariabelen>) 
- [Docker for your Laravel app](<https://delaparra-services.nl/manuals/docker-voor-je-laravel-app>)

 

## Related services

 

- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)

Perhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/env)
