https://github.com/wellwelwel/local-vps-and-ec2
☘️ A Docker image based on VPS and EC2, and a totally no-cost option to develop and test using a local Ubuntu server.
https://github.com/wellwelwel/local-vps-and-ec2
docker ec2 kvm ssh ubuntu vps
Last synced: 7 months ago
JSON representation
☘️ A Docker image based on VPS and EC2, and a totally no-cost option to develop and test using a local Ubuntu server.
- Host: GitHub
- URL: https://github.com/wellwelwel/local-vps-and-ec2
- Owner: wellwelwel
- Created: 2023-10-21T21:21:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-21T21:41:16.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T21:48:28.164Z (8 months ago)
- Topics: docker, ec2, kvm, ssh, ubuntu, vps
- Language: Dockerfile
- Homepage: https://github.com/wellwelwel/svps
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Local Ubuntu VPS and EC2 ☘️
A Docker image based on VPS and EC2 and a totally no-cost option to develop and test using a local server.
---
## Pull
```sh
docker pull wellwelwel/vps:latest
```- Also: `18.04`, `20.04`, `22.04`, `23.04` and `23.10`.
---
## Run
```sh
docker run --privileged -p 22:22 --restart always wellwelwel/vps:latest
```- Default root password is `root`
- Default port is `22`
- `--privileged` option is required to use `sudo` commands---
## Compose
```yml
version: '3.9'
services:
vps:
image: 'wellwelwel/vps:latest'
privileged: true
restart: always
ports:
- '22:22'
```- Default root password is `root`
- Default port is `22`---
### Accessing
```sh
ssh root@127.0.0.1
```- Default root password is `root`
---
## Customizing
### You can personalize the port and password:
```yml
version: '3.9'
services:
vps:
image: 'wellwelwel/vps:latest'
privileged: true
restart: always
ports:
- '2222:2222'
environment:
PASSWORD: password
PORT: 2222
```You can also set a password using a file:
```yml
version: '3.9'
services:
vps:
image: 'wellwelwel/vps:latest'
privileged: true
restart: always
ports:
- '22:22'
volumes:
- ./.secret:/root/.secret:ro
```- Securely set the password in a volume to file `/root/.secret` with `sudo chmod 0400`
---
> It's an image created for [**SVPS Project**](https://github.com/wellwelwel/svps) 🧙🏻