Pro Linux Container

Brap provision Linux Containers to subscribers called Pro Linux Container with pre-installed open-source software for full-stack development or general programming.

Pre-Installed Software

The Pro Linux Containers of Brap are pre-installed wih the following open-source software:

  • Ubuntu 22.04 Server Operating System (OS)
  • Git
  • ZSH
  • Oh My ZSH
  • Ubuntu 22.04 Server
  • Git
  • VS Code
  • C
  • C++
  • Java
  • Rust
  • PHP via ppa:ondrej/php
    • PHP 8.2
    • PHP 8.1
    • PHP 8.0
    • PHP 7.4
    • PHP 7.3
    • PHP 7.2
    • PHP 7.1
    • PHP 7.0
    • PHP 5.6
  • Composer
  • MySQL
  • Sqlite
  • phpMyAdmin
  • React.js
  • Ruby
  • Python
  • Go
  • Node.js 20 via Node Version Manager (NVM)
  • Node Package Manager (NPM)
  • NPM serve
  • Angular CLI
  • Ionic CLI
  • Vim

You may install additional software as you need. For example, to display a nice system information about your Pro Linux Container, install and run neofetch:

apt install neofetch

neofetch

Application Ports and Proxy

To allow your applications to be accessible from the web, you are pre-assigned with domains that are proxied to the commonly-used application ports:

example-rifleman-qt9z-3000.brap.dev <--- proxied to ---> 3000
example-rifleman-qt9z-4200.brap.dev <--- proxied to ---> 4200
example-rifleman-qt9z-5173.brap.dev <--- proxied to ---> 5173
example-rifleman-qt9z-5500.brap.dev <--- proxied to ---> 5500
example-rifleman-qt9z-8000.brap.dev <--- proxied to ---> 8000
example-rifleman-qt9z-8081.brap.dev <--- proxied to ---> 8081
example-rifleman-qt9z-8100.brap.dev <--- proxied to ---> 8100

For example, to serve a Hello, World! application in PHP to the public, run:

php -S localhost:8000 ./ hello-world.php

or
php -S 127.0.0.1:8000 ./ hello-world.php

or
php -S 0.0.0.0:8000 ./ hello-world.php

Of course, since your proxy domains are public, your proxy domains require your username and password for your Pro Linux Container:

Notice that your proxy domains are secured by requiring authorization using your username and password for your Pro Linux Container:

Proxy domain requiring authorization

Screenshot: Proxy domain secured by requiring authorization via username and password.

On NodeJS and Ruby on Rails applications, port 3000 is typically used. Thus, running serve and rails server will bind these applications to subdomain-example-3000.brap.dev.

On Angular applications, port 4200 is typically used. Thus, running ng serve will bind your Angular application to subdomain-example-4200.brap.dev.

On Vue.js applications, port 5173 is typically used. Thus, running npm run dev in a Vue.js application will bind it to subdomain-example-5173.brap.dev.

The popular Live Server extension for VS Code uses port 5500 to serve static and dynamic files. Thus, going live via the Go Live feature of Live Server will bind current working directory to subdomain-example-5500.brap.dev.

On Laravel and Django applications, port 8000 is typically used. Thus, running php artisan serve and python manage.py runserver will bind these applications to subdomain-example-8000.brap.dev.

On Ionic applications, port 8100 is typically used. Thus, running ionic serve will bind Ionic applications to subdomain-example-8100.brap.dev.

Sometimes, you may need to kill the process that is already using a port before using it:

sudo kill -9 $(sudo lsof -t -i:3000)
sudo kill -9 $(sudo lsof -t -i:4200)
sudo kill -9 $(sudo lsof -t -i:5173)
sudo kill -9 $(sudo lsof -t -i:5500)
sudo kill -9 $(sudo lsof -t -i:8000)
sudo kill -9 $(sudo lsof -t -i:8081)
sudo kill -9 $(sudo lsof -t -i:8100)

Sharing Applications

NOTICE that BRAP.dev is intended for personal software development only. We discourage sharing your applications that are running on BRAP.dev domains. But if you must, share your applications at your own risk.

If you need to share your application via your proxy hostnames, we recommend that you create a unique username and password for each user you need to share to.

To view the username and password pairs for your proxy hostnames, run:

cat /etc/nginx/.htpasswd

To create a username and password pair for your proxy hostnames, run the command and follow the prompt instructions:

sudo htpasswd -c /etc/nginx/.htpasswd joserizal

Please carefully manage the file /etc/nginx/.htpasswd and keep only the username and password pairs that you intend to have access to your proxy hostnames.

Installing Additional Software

TODO: Use Homebrew over APT...

You may install additional software (or packages) using the native Advance Package Tool (APT) of Ubuntu.

To install a package, run:

apt install package-name

To uninstall a package, run:

apt remove package-name

You may refer to other guides of the particular package you wish to install, such as from its official website. For example, you may google:

We also recommend using Homebrew instead of APT to install additional software.

To install Homebrew, run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

To install and uninstall software using Homebrew, run for example:

brew install pyenv
brew uninstall pyenv
brew remove pyenv

Keywords

  • linux
  • container
  • virtual machine
  • operating system
  • os
  • command line interface
  • cmd
  • terminal
  • bash
  • zsh
  • shell

Back to top