Build the UR Codes Server when Inbound Network Traffic is Blocked

Learn how to build the UR Codes SDKs when Inbound Network Traffic is Blocked.

Restricted Network Access

Some System Architectures restrict access to the Internet, preventing Developers & System Administrators from installing and running the UR Codes SDKs via the default steps. When Internet Access is restricted, resources cannot be automatically pulled from the Internet using Docker.

Running the UR Codes SDKs via Docker

Running the Encoder Server or Matcher Server via Docker requires building the FaceTec Server Docker Image on a machine outside of Your Restricted Network Access Environment and transferring it via a Removable Storage Device or a Secure Intranet Connection. If Docker is not already installed on the Server within Your Restricted Network Access Environment, installing the Docker Engine from its Static Binary is necessary.

Step 1: Build Server Docker Image on an Outside Machine
  1. Download the UR Encoder SDK or UR Matcher SDK onto a machine with Docker and Internet Access (i.e. outside of the Environment with Blocked Inbound Network Traffic).
  2. Extract the UR Codes SDKs.
  3. In the encoder_server_lib or matcher_server_lib directory, build the Docker Image by running the command docker-compose build.
  4. Create a tarball of the Docker Image by running one of these commands:
    • Encoder Server: docker save -o ur_encoder_server.tar ur_encoder_server:latest
    • Matcher Server: docker save -o ur_matcher_server.tar ur_matcher_server:latest
  5. On success, the tarball will be created in the root directory of the Matcher or Encoder Server.
Step 2: Transfer Docker Image & Compose File to Your Environment with Blocked Inbound Network Traffic

Removable Storage Device:

  1. Copy the tarball and docker-compose.yml file onto Your Removable Storage Device.
  2. Follow the process outlined by Your Company for transferring data via a Removable Storage Device to the Environment with Blocked Inbound Network Traffic.
  3. On success, the tarball and docker-compose.yml will now be on Your Server and with Restricted Network Access.

Intranet Connection:

  1. Copy the tarball onto Your Server. For Linux, use the following command: scp /Path/to/ur_***_server.tar <USERNAME>@<SERVER_ADDRESS>:/Path/on/server.
  2. Copy the docker-compose.yml file onto Your Server. For Linux, use the following command: scp /Path/to/docker-compose.yml <USERNAME>@<SERVER_ADDRESS>:/Path/on/server.
  3. On success, the tarball and docker-compose.yml will now be on Your Server and with Restricted Network Access.
Step 3: Build Docker from its Binaries (if Docker is not installed)
  1. Download the corresponding Static Binary as a tarball from Docker's Static Binaries.
  2. Transfer the Docker tarball as described in Step 2: Transfer Docker Image & Compose File to Your Environment with Blocked Inbound Network Traffic.
  3. Extract Docker via the tar command: tar xzvf /Path/to/Docker_Tarball.
  4. Copy Docker into a directory that is a part of Your Executable Path. /usr/bin is recommended: sudo cp docker/* /usr/bin.
  5. Run the Docker Daemon: sudo dockerd &.
    • Important Note: This step may first require iptables to be configured and running on the system.
  6. On success, you will get the Usage Definition for Docker when running sudo docker.
Step 4: Install the Docker Compose CLI Plugin (if Docker Compose is not installed)
  1. Download the Docker Compose CLI Plugin on a machine with Internet Access:
    curl -SL https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-linux-x86_64 -o docker-compose
  2. Transfer docker-compose as described in Step 2: Transfer Docker Image & Compose File to Your Environment with Blocked Inbound Network Traffic.
  3. Create a directory to run the Docker Compose CLI Plugin with Root Privileges. Example on AWS EC2 Instance:  sudo mkdir -p /usr/local/lib/docker/cli-plugins.
  4. Move the Docker Compose CLI Plugin into the directory created in the previous step: sudo mv docker-compose /usr/local/lib/docker/cli-plugins/docker-compose.
  5. Add execute permissions to the Docker Compose CLI Plugin: chmod +x /usr/local/lib/docker/cli-plugins/docker-compose.
  6. On success, you will get the Usage Definition for Docker Compose when running sudo docker compose.
Step 5: Load and Run UR Encoder or UR Matcher Server Docker Container
  1. On Your Server with Restricted Network Access, go to the directory with the UR Encoder or UR Matcher Server Docker Image.
  2. Load the Docker image into Docker: sudo docker load -i ur_encoder_server.tar.
  3. From the same directory as the docker-compose.yml file, run sudo docker compose up.
  4. On success, Docker will run the UR Encoder Server or UR Matcher Server, and the Server will initialize successfully.