Create a Dockerfile

The first step in creating a working Docker image is to write a Dockerfile that adds the required components to a base image. We’ll then use the docker build command and the Dockerfile to create a runnable Docker image containing the Anjuna Runtime.

To set up a working Dockerfile, begin by creating a directory to contain it.

Then, inside the directory, using your favorite editor, create a file named "Dockerfile".

Next, find the following section that matches your chosen version of Linux and use the sample Dockerfile contents in that section to populate your new Dockerfile.

Ubuntu 20.04

FROM ubuntu:20.04

# Adding the Anjuna Runtime and dependencies to the image
ADD anjuna-with-deps-ubuntu-20.04.tar.gz /

# Setting up environment variables
ENV PATH="/anjuna/bin:/anjuna/tools:${PATH}"
ENV ANJUNA_DIR=/anjuna/
ENV ANJUNA_BIN_DIR=/anjuna/bin
ENV SGX_SIGNER_KEY=/anjuna/signing/enclave-key.pem
ENV AZDCAP_DEBUG_LOG_LEVEL=error

# Updating the CA certificates to allow attestation
RUN ["/bin/bash", "-c", "echo mozilla/DigiCert_Global_Root_G2.crt >> /etc/ca-certificates.conf"]
RUN ["/bin/bash", "-c", "echo mozilla/COMODO_RSA_Certification_Authority.crt >> /etc/ca-certificates.conf"]
RUN ["/bin/bash", "-c", "echo mozilla/USERTrust_RSA_Certification_Authority.crt >> /etc/ca-certificates.conf"]
RUN ["mkdir", "-p", "/etc/ssl/certs"]
RUN ["/bin/bash", "/usr/sbin/update-ca-certificates"]

If you’re using a different base Docker image that is based on ubuntu:20.04, replace the first line with the name of the correct image.

Ubuntu 18.04

FROM ubuntu:18.04

# Adding the Anjuna Runtime and dependencies to the image
ADD anjuna-with-deps-ubuntu-18.04.tar.gz /

# Setting up environment variables
ENV PATH="/anjuna/bin:/anjuna/tools:${PATH}"
ENV ANJUNA_DIR=/anjuna/
ENV ANJUNA_BIN_DIR=/anjuna/bin
ENV SGX_SIGNER_KEY=/anjuna/signing/enclave-key.pem
ENV AZDCAP_DEBUG_LOG_LEVEL=error

# Updating the CA certificates to allow attestation
RUN ["/bin/bash", "-c", "echo mozilla/DigiCert_Global_Root_G2.crt >> /etc/ca-certificates.conf"]
RUN ["/bin/bash", "-c", "echo mozilla/COMODO_RSA_Certification_Authority.crt >> /etc/ca-certificates.conf"]
RUN ["/bin/bash", "-c", "echo mozilla/USERTrust_RSA_Certification_Authority.crt >> /etc/ca-certificates.conf"]
RUN ["mkdir", "-p", "/etc/ssl/certs"]
RUN ["/bin/bash", "/usr/sbin/update-ca-certificates"]

If you’re using a different base Docker image that is based on ubuntu:18.04, replace the first line with the name of the correct image.

Debian 10

FROM debian:buster

# Adding the Anjuna Runtime and dependencies to the image
ADD anjuna-with-deps-debian-10.tar.gz /

# Setting up environment variables
ENV PATH="/anjuna/bin:/anjuna/tools:${PATH}"
ENV ANJUNA_DIR=/anjuna/
ENV ANJUNA_BIN_DIR=/anjuna/bin
ENV SGX_SIGNER_KEY=/anjuna/signing/enclave-key.pem
ENV AZDCAP_DEBUG_LOG_LEVEL=error

# Updating the CA certificates to allow attestation
RUN ["/bin/bash", "-c", "echo mozilla/DigiCert_Global_Root_G2.crt >> /etc/ca-certificates.conf"]
RUN ["/bin/bash", "-c", "echo mozilla/COMODO_RSA_Certification_Authority.crt >> /etc/ca-certificates.conf"]
RUN ["/bin/bash", "-c", "echo mozilla/USERTrust_RSA_Certification_Authority.crt >> /etc/ca-certificates.conf"]
RUN ["mkdir", "-p", "/etc/ssl/certs"]
RUN ["/bin/bash", "/usr/sbin/update-ca-certificates"]

If you’re using a different base Docker image that is based on debian:buster, replace the first line with the name of the correct image.

CentOS 8

FROM centos:8

# Adding the Anjuna Runtime and dependencies to the image
ADD anjuna-with-deps-centos-8.tar.gz /

# Setting up environment variables
ENV PATH="/anjuna/bin:/anjuna/tools:${PATH}"
ENV ANJUNA_DIR=/anjuna/
ENV ANJUNA_BIN_DIR=/anjuna/bin
ENV SGX_SIGNER_KEY=/anjuna/signing/enclave-key.pem
ENV AZDCAP_DEBUG_LOG_LEVEL=error

If you’re using a different base Docker image that is based on centos:8, replace the first line with the name of the correct image.

RHEL 8

FROM registry.redhat.io/ubi8/ubi-minimal:8.3

# Adding the Anjuna Runtime and dependencies to the image
ADD anjuna-with-deps-rhel-8.tar.gz /

# Setting up environment variables
ENV PATH="/anjuna/bin:/anjuna/tools:${PATH}"
ENV ANJUNA_DIR=/anjuna/
ENV ANJUNA_BIN_DIR=/anjuna/bin
ENV SGX_SIGNER_KEY=/anjuna/signing/enclave-key.pem
ENV AZDCAP_DEBUG_LOG_LEVEL=error

If you’re using a different base Docker image that is based on RHEL 8, replace the first line with the name of the correct image.