Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile #520

Merged
merged 1 commit into from
Jul 6, 2018
Merged

Add Dockerfile #520

merged 1 commit into from
Jul 6, 2018

Conversation

lemmarathon
Copy link
Contributor

@lemmarathon lemmarathon commented Jun 29, 2018

Addresses issue #508

To build the Docker image (in repo root):

docker build -t galoisinc/cryptol .

To pass build arguments to make, use --build-args:

docker build --build-args TESTS= --build-args DIFF=meld -t galoisinc/cryptol .

To pull the current development image:

docker pull lemmarathon/cryptol

To run cryptol:

docker run -it lemmarathon/cryptol

Tasks:

  • Pass all tests
  • Build as unprivileged user
  • Pass options (e.g. DIFF, TESTS) to make via build-args
  • Remove unnecessary layers
  • Base runtime image on scratch image? Current (alpine-based) image is 38 24 17 MB compressed, 74 54 MB uncompressed. Uncompressed size could be reduced to 40 MB (see output below), but it's probably not worth the extra build steps.
# du -csh $(echo $(ldd `which cryptol`) $(ldd `which z3`) | grep -o '/[^ ]*' | sort | uniq) /usr/local /home/cryptol /usr/bin/z3
552.0K  /lib/ld-musl-x86_64.so.1
4.0K    /usr/lib/libffi.so.6
72.0K   /usr/lib/libgcc_s.so.1
4.0K    /usr/lib/libgmp.so.10
4.0K    /usr/lib/libgomp.so.1
4.0K    /usr/lib/libncursesw.so.6
4.0K    /usr/lib/libstdc++.so.6
18.2M   /usr/local
28.0K   /home/cryptol
20.6M   /usr/bin/z3
39.5M   total

@lemmarathon lemmarathon changed the title Add Dockerfile (WIP) Add Dockerfile Jun 30, 2018
@lemmarathon
Copy link
Contributor Author

Currently Works on My Machine™. Additional testing needed (e.g. sharing data with host via volumes). Size is 27 MB compressed, 74 MB uncompressed. libz3.so is 20.5 MB, however, and doesn't seem to be required, according to ldd. Retesting without libz3.so to see if we can save some extra MB.

@lemmarathon
Copy link
Contributor Author

Squashed commits and rebased on current master. This PR is ready for review by a maintainer. @atomb?

@atomb atomb merged commit 89cce64 into GaloisInc:master Jul 6, 2018
@brianhuffman brianhuffman mentioned this pull request Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants