Skip to content

Containers

Most of the container images provided in our managed stacks are based on the light-weight Linux distribution Alpine Linux (based on musl libc). All images are public and available on Docker Hub, their sources can be found on GitHub.

Accessing containers

via SSH container

Some stacks provide an SSHd container to access your codebase. You can find the SSH command on the Instance > Stack > SSHd page. We automatically add the public SSH keys from your Wodby profile to this container for every user who has access to the instance. Add a key from Profile > Keys > Add new key.

Wodby supports the following OpenSSH public key types:

  • Ed25519 (ssh-ed25519) — recommended
  • ECDSA with the NIST P-256, P-384, or P-521 curves (ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521)
  • RSA (ssh-rsa) with a minimum key size of 2048 bits

Paste one public key in OpenSSH format. An optional comment after the key is accepted. Authorized-keys options, DSA keys, hardware-backed FIDO/security-key (sk-*) keys, OpenSSH certificates, and post-quantum key types are not supported.

as default user

If your stack does not have sshd container or you need to access a different container follow these steps:

  • Connect to the server where app instance is deployed by SSH
  • Navigate to Instance > Stack > [CONTAINER] from Wodby dashboard
  • Copy the Access Command command
  • Execute the copied command on the server as root
  • Now you're inside of the container as container default user

as root

If you need root permissions inside a container and container's default user is not root, follow these steps:

  1. Access a container as a default user and get container hostname by executing the following command:

    echo $HOSTNAME
    

  2. Execute the following command from a host server as root by replacing [HOSTNAME] with your value

    docker exec -ti --user=root $(docker ps | grep [HOSTNAME] | grep -v pause | awk '{ print $1 }') sh
    

Accessing containers data from host

Containers persistent data can be accessed from the host server under /srv/wodby/instances/[INSTANCE_UUID]

This may cause unexpected issues

Be careful while modifying containers' files as root – it could cause unexpected permissions issues because containers have a default user different from root

Accessing container from local environment

# Get container id 
docker ps -a
# Access container via shell
docker exec -ti [container id] sh