Create a file called "Dockerfile" (no extension) with the following content.This configuration will be used to build the Docker image.
COPY snowCli /dockerDestinationFolder
RUN apt-get update
RUN apt-getinstall -y ca-certificates openssl
When using the Ubuntu image to run the SnowConvert CLI for Linux a couple of dependencies must be added to the Dockerfile in order to activate the license, for this purpose System.Globalization.Invariant must be turned ON and the OpenSSL must be installed to be able to establish an HTTPS connection for the license validation.
In addition to the dependencies installation, the second line (COPY command) is used to copy files from the local machine inside the image. In this case, the snowCLI file (located in the same folder as the Dockerfile) will be copied to/dockerDestinationFolderinside the image.
Build the image
Launch Docker Desktop app.
Open Visual Code where the "Dockerfile" is located. If you have previously installed the Docker extension for Visual Code, the "Dockerfile" will be automatically recognized as a docker configuration file by Visual Code. Right-click on the "Dockerfile" and hit "Build image..."
This will prompt for a name to give the image, at the top of Visual Code.
Use any name you want and hit "Enter". That causes Docker to set up the container, by pulling the Ubuntu image, installing dependencies, copying the specified files. Wait for the terminal to finish. Once you see a message like this one, it means the image was successfully built.