diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..fa3ab4f04b1d0c9cf2d0fbbeac6720bee38edab0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM debian:jessie + +RUN apt-get update && \ + apt-get install -y \ + gcc \ + make \ + binutils \ + libmicrohttpd-dev \ + libjansson-dev \ + libcurl4-gnutls-dev \ + libgnutls28-dev \ + libgcrypt20-dev \ + libcryptsetup-dev +ENV LD_LIBRARY_PATH="/cryptops-api/libraries" + +WORKDIR /cryptops-api +COPY . ./ + +CMD ["make"] diff --git a/README.md b/README.md index 0f3e7238b918a809d68ea3dc7d7d6fd5d37c778f..2fd961c3b63480596ddbb371f26abae36a88534e 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,23 @@ All documentation can be found on In particular, please read the [security considerations](https://cryptops.com/considerations.html). + +## Building + +docker is used for containerised building. + +To build the project, first build the docker image: +```shell +docker build -t cryptops-build . +``` +Then run the container to perform the build process: +```shell +docker run --name cryptops-build cryptops-build +``` +Finally, copy the created binary from the container: +```shell +mkdir -p ./bin +docker cp cryptops-build:/cryptops-api/bin/cryptops-api ./bin/ +``` + +This binary `cryptops-api`, together with the libraries in `./libraries/`, need to be added to your initrd. diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 42171daf6e3883ed829fb12633f344f3d24ae480..0000000000000000000000000000000000000000 --- a/Vagrantfile +++ /dev/null @@ -1,18 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - config.vm.box = "debian/jessie64" - config.vm.synced_folder ".", "/cryptops-api", type: 'virtualbox' - # If cryptops-client directory exists, mount it as well so you can test easier - if File.directory?(File.expand_path('../cryptops-client')) - config.vm.synced_folder "../cryptops-client", "/cryptops-client", type: 'virtualbox' - end - config.vm.provision "shell", inline: <<-SHELL - apt-get update - apt-get install -y libmicrohttpd-dev libjansson-dev libcurl4-gnutls-dev libgnutls28-dev libgcrypt20-dev libcryptsetup-dev - if ! grep -q 'export LD_LIBRARY_PATH="/cryptops-api/libraries"' /home/vagrant/.bashrc ; then - echo export LD_LIBRARY_PATH="/cryptops-api/libraries">> /home/vagrant/.bashrc - fi - SHELL -end