FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/tpu/clean-layer.sh at main · Kaggle/docker-python · GitHub
Kaggle
/
docker-python
Public
Notifications
You must be signed in to change notification settings
Fork
1k
Star
2.7k
Code
Issues
25
Pull requests
8
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
tpu
/
clean-layer.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
22 lines (21 loc) · 679 Bytes
Breadcrumbs
docker-python
/
tpu
/
clean-layer.sh
Copy path
File metadata and controls
executable file
·
22 lines (21 loc) · 679 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!
/bin/bash
#
#
This scripts should be called at the end of each RUN command
#
in the Dockerfiles.
#
#
Each RUN command creates a new layer that is stored separately.
#
At the end of each command, we should ensure we clean up downloaded
#
archives and source files used to produce binary to reduce the size
#
of the layer.
set
-e
set
-x
#
Delete files that pip caches when installing a package.
rm -rf /root/.cache/pip/
*
#
Delete old downloaded archive files
apt-get autoremove -y
#
Delete downloaded archive files
apt-get clean
#
Ensures the current working directory won't be deleted
cd
/usr/local/src/
#
Delete source files used for building binaries
rm -rf /usr/local/src/
*
Back
|
FazBrowse Home
|
New Git URL