Sign inSign up

techthinkerorg/ubuntu-server

By techthinkerorg

Updated about 2 years ago

Image
Developer tools
Operating systems
1

1.5K

techthinkerorg/ubuntu-server repository overview

Ubuntu-Server

It's a ubuntu server with pre-installed docker containers. Click on the link to check available versions.

  • Default User: ubuntu
  • Default Password: toor
  • Root Password: toor

Installation

  • docker-compose.yaml
version: "3"

services:
  ubuntu-server:
    container_name: ubuntu-server
    image: techthinkerorg/ubuntu-server:24.04
    hostname: ubuntu-server
    privileged: true
    volumes:
      -  ./workspace:/home/ubuntu/workspace
    ports:
      - "8022:22"
      - "2376:2375"
    networks:
      - net

networks:
  net:
  • Run: docker-compose up -d

Networking

For better networking, you can use subnet for deployment. Here in this example create a subnet named subnet1 with netmask 10.10.0.0, gateway 10.10.0.1.

docker network create --subnet=10.10.0.0/16 --gateway=10.10.0.1 subnet1

Now create docker compose with external network and two ubuntu instances:

version: "3.8"
services:
  ubuntu-server1:
    image: techthinkerorg/ubuntu-server:24.04
    container_name: ubuntu-server1
    hostname: ubuntu-server1
    privileged: true
    restart: unless-stopped
    ports:
      - 8022:22
      - 2376:2375
    networks:
      - subnet1
    volumes:
      - ubuntu-data-home1:/home
      - ubuntu-data-var1:/var
      - ubuntu-data-etc1:/etc
      - ubuntu-data-usr-local1:/usr/local
  ubuntu-server2:
    image: techthinkerorg/ubuntu-server:24.04
    container_name: ubuntu-server2
    hostname: ubuntu-server2
    privileged: true
    restart: unless-stopped
    ports:
      - 8023:22
      - 2377:2375
    networks:
      - subnet1
    volumes:
      - ubuntu-data-home2:/home
      - ubuntu-data-var2:/var
      - ubuntu-data-etc2:/etc
      - ubuntu-data-usr-local2:/usr/local
volumes:
  ubuntu-data-home1: null
  ubuntu-data-var1: null
  ubuntu-data-etc1: null
  ubuntu-data-usr-local1: null
  ubuntu-data-home2: null
  ubuntu-data-var2: null
  ubuntu-data-etc2: null
  ubuntu-data-usr-local2: null
networks:
  subnet1:
    external: true

How to access

  • If you use from host machine using exposed port then:
ssh ubuntu@localhost -p 8022
  • If you are using subnet from host machine.

Tag summary

Content type

Image

Digest

sha256:819668d13

Size

337.6 MB

Last updated

about 2 years ago

docker pull techthinkerorg/ubuntu-server