LogoLogo
edgegap.comDashboard
  • 📘Learning Center
    • Getting Started
    • Unity Games
      • Getting Started - Servers
      • Developer Tools
    • Unreal Engine Games
      • Getting Started - Servers
      • Developer Tools
    • Matchmaking
      • Getting Started
      • Matchmaker In-Depth
      • Ping Beacons
    • Advanced Features
      • Apps and Versions
      • Deployments
      • Managed Clusters
  • API Reference
    • Dedicated Servers
    • Integration
    • Matchmaking
    • Peer to Peer
  • Release Notes
  • 📚Documentation
    • Sample Projects
      • Unity Netcodes
        • Unity NGO
        • Photon Fusion 1
        • Photon Fusion 2
        • Mirror
        • Mirror WebGL
        • Fishnet
        • Fishnet WebGL
        • Photon Bolt
      • Unreal Top-Down Sample
      • NuxtJS
      • Ruby On Rails
      • Unity Lobbies
      • Unity Matchmaker
    • Tools & Integrations
      • Container
        • What is Docker
        • Your First Docker
        • The Good Practices
        • SSH in Your Container
        • External Registries
          • Docker Hub
          • AWS ECR
          • GCP GCR
          • Gitlab registry
      • Deploy from Nakama
      • EOS Lobby Integration
      • Switch From Gamelift
      • Switch From Multiplay
      • Playfab Bridge
    • Deployment
      • Endpoint Storage
        • How to Save Logs
        • Upload File to Deployment
      • Webhooks
    • Application
      • Command and Arguments
      • 1:1 Port Mapping
    • Session
      • How They Work
      • Application Version Configuration
      • Manage Request
      • Selectors Filtering
    • Fleet
      • Fleet Policy
      • Policy Filter
      • Linking Version
      • Fleet's Deployment
    • Container Registry
    • Distributed Relay
      • Matchmaker/Lobby
      • Relay Edgegap API
      • Transport Samples
    • Lobby
      • Lobby Service
      • Functions
    • Glossary
    • SLA Terms
Powered by GitBook
LogoLogo

Connect with Community

  • Discord
  • Linkedin
  • X

Read More

  • Release Notes
  • Blog
  • Enterprise
  • Legal
  • edgegap.com

© 2025 Edgegap

On this page
  • Modifying your Dockerfile
  • On Edgegap

Was this helpful?

  1. Documentation
  2. Tools & Integrations
  3. Container

SSH in Your Container

Edgegap does not recommend having SSH service accessible in your production deployments.

Modifying your Dockerfile

We will build the docker container using a different Docker Dockerfile in this version.

We will need to install the OpenSSH service and enable it Create a User and a password to connect to your server.

In a container running on Alpine, merge the following:

RUN apk --update add --no-cache openssh bash
RUN sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config
RUN echo "tester:$ecureP@ss" | chpasswd

EXPOSE 22

In a container running on Ubuntu, add the following:

RUN apt-get update
RUN apt-get install openssh-server sudo -y

RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000
RUN echo 'tester:$ecureP@ss' | chpasswd

EXPOSE 22

In your entrypoint, you will need to add the following command:

service ssh start

We suggest testing the deployment locally, using the docker run command to test the server start.

Once tested, you can push your new version on the container repository.

On Edgegap

We suggest having a version called -dev or something that would make sense in your service. By doing so, you will have the option to do some tests and log into your container easily using the Edgegap infrastructure.

  1. Create a new version of your app, adding the Expose TCP Port 22

  2. Create a deployment using the new version you just created

  3. Once you have the service running (Ready), look in your deployment information. You will see the external port mapping of port 22.

  4. You can use Putty and connect using the FQDN of the deployment or Ip & the port mapping used

  5. The username and password that you configured.

PreviousThe Good PracticesNextExternal Registries

Last updated 2 months ago

Was this helpful?

📚