This repository has been archived by the owner on Mar 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rootfs build process to be more portable
[#89744426]
- Loading branch information
Showing
8 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
all: cflinuxfs2.tar.gz lucid64.tar.gz | ||
|
||
|
||
cflinuxfs2.cid: cflinuxfs2/Dockerfile | ||
docker build --no-cache -t cloudfoundry/cflinuxfs2 cflinuxfs2 | ||
docker run --cidfile=cflinuxfs2.cid cloudfoundry/cflinuxfs2 dpkg -l | tee cflinuxfs2/cflinuxfs2_dpkg_l.out | ||
|
||
cflinuxfs2.tar: cflinuxfs2.cid | ||
docker export `cat cflinuxfs2.cid` > cflinuxfs2.tar | ||
docker export `cat cflinuxfs2.cid` > /tmp/cflinuxfs2.tar | ||
# Always remove the cid file in order to grab updated package versions. | ||
rm cflinuxfs2.cid | ||
|
||
cflinuxfs2.tar.gz: cflinuxfs2.tar | ||
tar -C cflinuxfs2/assets -f cflinuxfs2.tar -r etc/hosts etc/timezone | ||
gzip -f cflinuxfs2.tar | ||
./bin/make_tarball.sh cflinuxfs2 | ||
|
||
lucid64.cid: lucid64/Dockerfile | ||
docker build --no-cache -t cloudfoundry/lucid64 lucid64 | ||
docker run --cidfile=lucid64.cid cloudfoundry/lucid64 dpkg -l | tee lucid64/lucid64_dpkg_l.out | ||
|
||
lucid64.tar: lucid64.cid | ||
docker export `cat lucid64.cid` > lucid64.tar | ||
docker export `cat lucid64.cid` > /tmp/lucid64.tar | ||
# Always remove the cid file in order to grab updated package versions. | ||
rm lucid64.cid | ||
|
||
lucid64.tar.gz: lucid64.tar | ||
tar -C lucid64/assets -f lucid64.tar -r etc/hosts etc/timezone | ||
gzip -f lucid64.tar | ||
./bin/make_tarball.sh lucid64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
make_tarball=" | ||
mkdir -p /tmp/$1/etc | ||
cp $1/assets/etc/hosts /tmp/$1/etc/hosts | ||
cp $1/assets/etc/timezone /tmp/$1/etc/timezone | ||
tar -C /tmp/$1 -xf /tmp/${1}.tar | ||
ls /tmp/$1/ | xargs tar -C /tmp/$1 -czf ${1}.tar.gz | ||
rm -rf /tmp/$1 | ||
" | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
sudo bash -c "$make_tarball" | ||
sudo chmod a+rw ${1}.tar.gz | ||
else | ||
bash -c "$make_tarball" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters