Skip to content

Commit

Permalink
control-plane: remove needless step in docker build. (#2947)
Browse files Browse the repository at this point in the history
# Why

Between each step in a docker build it needs to save a snapshot of the
system.
Some operations actually require unpacking layers created before it. 

This python -V is a really expensive operation. 

Because it needs to unpack all the layers that came before it to run
that command.


from the logs we can see 
```
INFO[0001] Unpacking rootfs as cmd RUN python -V requires it.
```

# What
I removed the operation because it actually has no impact. 

# How was this tested? 

I will deploy in CICD env and test when I get approvals. 
I want it removed incase there is some context I am missing.

Co-authored-by: paulm2 <[email protected]>
  • Loading branch information
murphp15 and paulm2 authored Nov 28, 2023
1 parent 709070b commit 85b44a2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ ARG GID=1000
# Set the working directory
WORKDIR /job

# Validate base image is python based
RUN python -V
# Create necessary users and set home directory to /job
RUN groupadd -r -g $GID vdkgroup && useradd -u $UID -g $GID -r vdkuser && chown -R $UID:$GID /job
ENV HOME=/job
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ ARG GID=1000
# Set the working directory
WORKDIR /job

# Validate base image is python based
RUN python -V
# Create necessary users and set home directory to /job
RUN groupadd -r -g $GID group && useradd -u $UID -g $GID -r user && chown -R $UID:$GID /job
ENV HOME=/job
Expand Down

0 comments on commit 85b44a2

Please sign in to comment.