Search…
Use with Docker
Quick setup and best practices.

Overview

You can use cased with Docker similarly to how you would with an ordinary system.
Although somewhat uncommon, there may be times when you need to manually run commands from within a Docker application container itself. For convenience, we recommend installing cased into the Docker container via your Dockerfile.

Quick setup and best practices

Adding the client is easy as updating your Dockerfile:
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/cased/cli-install/main/install.sh)"
RUN eval "$(cased-init -)"
For this installation mechanism, you may need need to also install Python3 and pip3. Add this line before the others:
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py
You can, of course, use other install mechanisms for your RUN command, including our upcoming Ubuntu snap option. It's entirely up to you—all the matters is that the cased program is on the PATH.
You can automatically run cased configure and prompt the user to connect with their credentials every time a shell is opened. Just add, for example:
RUN echo "cased configure" >> ~/root/.bashrc
to your Dockerfile and the user will be prompted each time a new shell is opened.

Example of Dockerfile

RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/cased/guard-install/main/install.sh)"
RUN eval "$(cased-init -)"
RUN echo "cased configure" >> /root/.bashrc
Copy link
On this page
Overview
Quick setup and best practices
Example of Dockerfile