Sign inSign up

ypatrin/ubuntu

By ypatrin

•Updated over 4 years ago

Ubuntu image alternative for VPS

Image
0

1.1K

ypatrin/ubuntu repository overview

⁠Ubuntu image with systemd and ssh server

You can use this image as an alternative for VPS. It's full Ubuntu image with systemd support and preinstalled ssh server.

⁠Supported tags

⁠Usage

  1. Create ipvlan network
docker network create -d ipvlan --subnet=192.168.50.0/24 --gateway=192.168.50.1 -o ipvlan_mode=l2 -o parent=wlp3s0 net0
  1. Run the container as a daemon:
docker run -d --name ubuntu --restart always --net=net0 --ip=192.168.50.210  --hostname=ubuntu.myhost.com --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro ypatrin/ubuntu:22.04
  1. Enter to the container:
docker exec -it ubuntu bash
  1. Add user admin:
useradd --home-dir /home/admin --groups sudo --create-home --shell /bin/bash admin
  1. Set password for user admin:
echo "admin:qwerty" | chpasswd
  1. Set password for root:
echo "root:qwerty" | chpasswd

⁠Optionally for production

  • Remove old ssh keys
rm -v /etc/ssh/ssh_host_*
  • Generate new ssh keys
dpkg-reconfigure openssh-server
systemctl restart ssh

Tag summary

Content type

Image

Digest

Size

648.9 MB

Last updated

over 4 years ago

docker pull ypatrin/ubuntu