Piece Together a Repeatable Frontend Dev Environ on Linux – InApps is an article under the topic Software Development Many of you are most interested in today !! Today, let’s InApps.net learn Piece Together a Repeatable Frontend Dev Environ on Linux – InApps in today’s post !

Read more about Piece Together a Repeatable Frontend Dev Environ on Linux – InApps at Wikipedia

You can find content about Piece Together a Repeatable Frontend Dev Environ on Linux – InApps from the Wikipedia website

Development environments are very personal in that every developer and every project has its own specific tools they either require or prefer. Once you get the perfect environment built, you’ll want to be able to make it such that it can be easily repeatable.

What do I mean?

Think of it this way: If you could create a sort of template environment that could easily be built, copied, and spun up, that would save you considerable time. No longer would you have to first deploy the operating system (OS) and then install all of the required software. It would just be a matter of re-using the “template” for your environment.

Sounds great, right?

Fortunately, there are a couple of easy ways to do this. The first obvious method would be to use a virtual machine technology, such as Oracle‘s VirtualBox, build your base VM and then clone it as needed. Another method would be to create a base container image that you can then deploy as needed. Either way you go, this is a great way of creating a repeatable front-end (or back-end) dev environment with Linux.

What I’m going to do is demonstrate how to do this using Linux Server 20.04 and a Docker container. Although we’ve already walked through the process of creating an image from a container, the important thing here is demonstrating how this can be done by installing certain dev tools on the OS (and then creating the “template” image to be later used).

Read More:   WebAssembly Aims to Eliminate the File System – InApps 2022

Install Docker

Before we do anything, you must first install Docker. To do that, log into your Ubuntu instance and install the necessary dependencies with the command:

sudo apt-get install ca-certificates curl gnupg lsb-release -y

Add the Docker GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add the Docker repository with the command:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Update apt and install Docker Community Edition with:

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io -y

Add your user to the docker group (to avoid security issues associated with deploying containers with sudo):

sudo usermod -aG docker $USER

Log out and log back in for the changes to take effect.

Create the ‘Template’ Container

We’ll now deploy a container that will serve as our template. We’ll do this with the latest version of the official Ubuntu image:

docker run -ti --name=ubuntu-dev-base ubuntu:latest

When this command completes, you’ll find yourself at the bash prompt of the container.

Install Our ‘Base’ Software

The software you need will obviously depend on the project and/or how you work. But let’s install a few fairly common pieces of software for front-end development. From the container’s bash prompt, update apt with:

apt-get update

Let’s first install Node.js and npm (Node.js Package Manager) with the command:

apt-get install nodejs npm -y

Answer the locale questions (where you are located and your time zone) and the installation will complete. With the npm package manager, we can then install SaSS (Syntactically Awesome Style Sheets) using the command:

npm install -g sass

Let’s now install git with:

apt-get install git -y

You can then install any other tools you’d need (so long as they don’t have a GUI) onto the running container. After you’ve completed that process, exit from the container with the command:

Read More:   Startup Atom Takes a Chilling Approach to Quantum Computing – InApps 2022

exit

We’ll now commit the changes with the command:

docker commit ubuntu-dev-base

This will create an untagged image. If you issue the command docker images, you’ll see an image listed with both the Repository and Tag fields listed as < None >. We need to tag that image, so it can be used. For that, copy the image ID associated with the untagged image and then tag it with:

docker tag ID ubuntu-dev-base

Where ID is the image ID for the untagged image.

You should now have an image listing that looks something like this:

You can then deploy a brand new container, using that new “template” with a command like:

docker run -it -d --name ubuntu-projectX ubuntu-dev-base

Once the container is running, you can access it with a command like this:

docker exec -it ubuntu-projectX bash

You can spin up as many of those environments as you like, knowing the original “template” will remain unchanged.

What if You Need GUI Tools?

If you need GUI tools for your development environment, your best bet is to use a Virtual Machine tool, like VirtualBox. You’d create a new VM (using your desktop of choice), install the necessary software, and then clone that VM as needed.

For example, to clone a VM in VirtualBox, you’d to the following. Select the VM to be cloned in the left navigation and click Clone. In the resulting window (Figure 1), give the clone a name (such as Dev Base), select a location, and click Next.

GUI: Clone a new virtual machine.

Figure 1: Cloning an instance of Ubuntu 22.04 Daily.

In the next window, select Full clone and click Clone. The cloning will take some time (2-5 minutes, depending on the size of the VM and the speed of the host machine). When it finishes, launch the clone, log into the desktop, and start installing the software you need. This process will be the same as outlined above, only you’ll need to use sudo with the commands.

Read More:   Sir Tim Berners-Lee’s Solid Protocol Returns Data to the User – InApps Technology 2022

After you’ve installed all of the software you need, power off the operating system. You can then clone this new VM as needed for a repeatable dev environment that perfectly meets your needs.

InApps is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Docker.

Source: InApps.net

List of Keywords users find our article on Google:

ubuntu 22.04
sass npm
lsb online banking
couple keyrings
hire linux developer
chi spin and curl
chi curl and spin
hire arch linux developers
linux outsourcing
ubuntu 22.04 sources.list
hire bash developers
update archlinux-keyring
qc time zone
npm sass
hire linux developers
hire docker developers
hire sass developer
containerd cli
linux keyring
ubuntu 22.04 download
linkedin ubuntu
docker gui tools
docker com
devbase
hire ubuntu developers
hire ubuntu developer
linuxserver docker
linux server wikipedia
docker .com
fetch recruitment
wikipedia linux
docker wikipedia
front end developer cos è
docker archlinux
linux consultant jobs
ubuntu keyring
hire bash developer
environ focus
industrial keyring
wikipedia ubuntu
what is keyring in ubuntu
always on top ubuntu
arch npm
npm install sass
ho chi minh tee times
apartment leasing in ho chi minh
eve online for linux
/usr/share
aclone xbase
docker ce
chi spin n curl review
dearmouring training
docker id
container icon docker
docker desktop ubuntu 20.04
ubuntu daily
chi spin & curl
devnull facebook com
keyring linux
virtualbox arch
containerd command
eve online virtual machine
sudo apt-get update para que serve
install node in docker
ubuntu daily build
container image tool
telegram for ubuntu
apt-get install curl
frontend developer portfolio
whatsapp ubuntu
whatsapp business linux
repeatability
repeatable
front end development
Rate this post
Content writer

Let’s create the next big thing together!

Coming together is a beginning. Keeping together is progress. Working together is success.

Let’s talk

Get a custom Proposal

Please fill in your information and your need to get a suitable solution.

    You need to enter your email to download

      Success. Downloading...