A Whale Not For Gacha: Docker

Nabila Khansa
5 min readJun 13, 2022

--

What is Docker?

Docker is a free and open platform for building, delivering, and operating apps. Docker allows you to decouple your apps from your infrastructure, allowing you to swiftly release software. You can manage your infrastructure the same way you control your applications with Docker. You may drastically minimize the time between writing code and executing it in production by leveraging Docker’s approaches for shipping, testing, and deploying code quickly.

Docker allows you to build and run an application in a container, which is a loosely isolated environment. Because of the isolation and security, you can operate multiple containers on the same host at the same time. Containers are small and include everything needed to operate an application, so you don’t have to rely on what’s already on the host. While you’re working, you can quickly share containers and ensure that everyone gets the same container that operates the same way.

Container

A container is a runnable instance of an image. Using the Docker API or CLI, you can create, start, stop, move, or destroy a container. You can attach storage to a container, connect it to one or more networks, or even construct a new image based on its existing state.

A container is often well separated from other containers and its host machine by default. You have control over how isolated a container’s network, storage, and other underlying subsystems are from other containers and the host machine.

Why Docker?

  • Your applications will be delivered quickly and consistently.
  • Scalable and responsive deployment.
  • Increases the number of workloads that can be run on the same hardware.

The Docker Desktop

Docker Desktop is a simple-to-use application for building and sharing containerized applications and microservices on your Mac or Windows computer. Docker Desktop includes Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper, as well as the Docker daemon (dockerd).

Developing Badaso LMS

These were the steps taken to setup Badaso LMS Frontend package to start development using Docker to view the result. badaso-lms-demo is a demo repository our team used as an app that uses the packages we’re developing. In its packages folder we have badaso-lms-theme and lms-module

badaso-lms-demo/package/badaso/

[1] git pull origin staging in the badaso-lms-theme folder

[2] git pull origin staging in the badaso-lms-demo folder

[3] composer install in the badaso-lms-theme folder

[4] composer install in the badaso-lms-demo folder

[5] yarn install in the badaso-lms-demo folder

  • IF yarn doesn’t exist in your computer, make sure you have npm to run npm install --global yarn
  • IF you don’t have npm installed, install NPM: GSGS from google
  • Try again to run yarn install
  • IF asked to choose a vuetify-loader version, choose version 1.7.3

[6] delete this from badaso-lms-demo/routes/web.php:

Route::get('/', function () { 
return view('welcome');
});

[7] docker-compose up OR docker compose up in the badaso-lms-demo folder

[8] npx mix watch --hot in the badaso-lms-demo folder

[9] open http://localhost/

  • IF you see a Class “Inertia\Middleware" not found error, run composer require inertiajs/inertia-laravelin the badaso-lms-demo folder
  • Try again to open http://localhost/

Equality in Development

Thanks to Docker, every member of our development team gets to develop Badaso in their local environment using the same setup without installing requirements individually. No member of the team will face special case issues.

“That works in your computer? How come it doesn’t work in mine?” — said no one in our team.

I hope you find this blog helpful, if you find any mistakes or misinformation, I would very much appreciate the feedback. Thank you!

References

Repositories

--

--

No responses yet