Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

fix single ENV syntax #21

Merged
merged 1 commit into from
Mar 18, 2016
Merged

Conversation

NoumanSaleem
Copy link
Contributor

Hi,

With our latest release using yesterday's container build, we've seen a spike in CPU usage for docker-cleanup.

CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O
9b5cb62b6772        109.55%             585.7 kB / 52.43 MB   1.12%               2.676 kB / 648 B    0 B / 3.092 MB

The latest change to move ENV to single line is missing required = signs as outlined in the docs, and causes the env vars to be incorrectly set: https://docs.docker.com/engine/reference/builder/#env

❯ docker run --rm -it --entrypoint=/bin/sh meltwater/docker-cleanup -c "printenv"
HOSTNAME=bd91acb68f4f
SHLVL=1
HOME=/root
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CLEAN_PERIOD=**None** DELAY_TIME **None** KEEP_IMAGES **None** KEEP_CONTAINERS **None** LOOP true DEBUG 0
PWD=/

This PR shows env correctly:

❯ docker run --rm -it --entrypoint=/bin/sh cleanup -c "printenv"
DEBUG=0
HOSTNAME=a7649a49780d
SHLVL=1
HOME=/root
KEEP_CONTAINERS=**None**
LOOP=true
TERM=xterm
DELAY_TIME=**None**
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CLEAN_PERIOD=**None**
PWD=/
KEEP_IMAGES=**None**

thanks

mikljohansson added a commit that referenced this pull request Mar 18, 2016
@mikljohansson mikljohansson merged commit 46aae2b into meltwater:master Mar 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants