- First steps
- Installers
- Plugins
Add extra packages to Linux container
August 4, 2017
Prerequisite
You must have a gorilla.com user.- You must have got installed Docker, GorillaJS and the Extra packages plugin.
Installation
$ gorilla plugin add extra_packages
To uninstall:
$ gorilla plugin remove extra_packages
How to use it
This plugin make easier the Linux packages installation and management in GorillaJS projects. To use it you only have to add “gorilla” before the command you want to execute.
For example, to instal Curl:
In Debian
$ gorilla apt-get install curl
In Alpine
$ gorilla apk add curl
In RedHat
$ gorilla yum install curl
In ArchLinux
$ gorilla pacman -S curl
To install packages in Ubuntu, for example:
$ gorilla apt list --installed
To uninstall Curl in Alpine:
$ gorilla apk del curl
And the same with any packages manager command your computer uses. The packages managers which are compatibles with this plugin are: apt, apk, pacman y yum. The earlier command will be executed in the main container of your project. GorillaJS uses some Docker containers to create projects: one for the database and the other for the app (the main one). Unless you tell it not to, GorillaJS will execute the changes with the commands of the main container. If you need to install the packages in other container you’ll have to use the “-c” parameter.
$ gorilla -c your_container_name apt-get install curl
If you don’t know the Docker container name you can use the “ps” Docker command:
$ docker ps
This command will generate a list with all the activated containers. GorillaJS uses the domain name of any project to utilize as prefix and identify the containers easily.
The NodeJS installer
The NodeJS template that comes as a default in GorillaJS uses the Express.js framework to start a server and return a response. This is optional, and once the application is running we can eliminate this server and use the application in any other way.
FAQ’s
Why do you need to free the port 80? Can you make your own installers? Can you use GorillaJS in a remote server?