Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

examples: added java7, which uses the host's apt-get - WIP #158

Closed
wants to merge 1 commit into from

Conversation

cgonyeo
Copy link
Member

@cgonyeo cgonyeo commented Dec 22, 2015

Putting this up for review. Rewrote the java7 section of https://github.com/appc/build-repository to use acbuild.

Addresses some (maybe all?) of appc/build-repository#10.

cc @jonboulle

trap rmDirectories EXIT

pushd ${PACKAGESDIR}
apt-get download \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holy giant unordered list of packages batman.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it came from the giant unordered list of packages that was a separate file before. Think if I kept this in a separate file still it would be a little saner?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no strong opinion, do what you think is best

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should go into separate .txt file which then could be used like $(cat deb-requirements.txt) - any further modification of this list would not touch this file.

@jonboulle
Copy link
Contributor

Sure, if it works lgtm

@jonboulle
Copy link
Contributor

ping

@cgonyeo
Copy link
Member Author

cgonyeo commented Jan 15, 2016

Needs testing. Will test next week.

shopt -s nullglob
for d in ${PACKAGESDIR}/*.deb; do
echo "Extracting $d"
dpkg-deb -x ${d} ${TMPDIR}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing that - You are skipping postinst process, also skipping of post install triggers (ldconfig for example).
Maybe using debootstrap with --include parameter would be more secure option for doing above work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using debootstrap to make a base, and without installing anything on top of that the ACI is at 134 MB.

I tried using the instructions in this SO post to just apt-get install nginx into a different root dir. It pulled in so many packages (packages like apt, adduser, mount, e2fslibs, ...) that it would use up 163 MB of disk space, and ended up erroring on the install process when /usr/bin/apt-listchanges wasn't found.

Just extracting deb files into a directory skips potentially important install steps, and doing it correctly signs you up for containers greater in size than 134 MB. I really think the only decent solution to integrating a package manager with a container build system is nix2aci, where you have a package manager that doesn't need to include everything and the kitchen sink in case there are undeclared dependencies (nix is guaranteed to actually know the dependencies of its packages, instead of "oh the guy had this binary available when he built the package so you need to too").

So @jonboulle, want me to leave this in its current state, make the containers massive, or drop this and just point to nix2aci?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace this with a nix java7 example?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly

@cgonyeo
Copy link
Member Author

cgonyeo commented Mar 11, 2016

Closing in favor of #158 (comment).

@cgonyeo cgonyeo closed this Mar 11, 2016
@cgonyeo cgonyeo deleted the build-repo-examples branch March 11, 2016 18:02
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.

3 participants