Skip to main content

Installing packages with apt-get on gitpod

Until recently I did not know that I could install packages with apt-get on gitpod as it always wanted me to have root permissions, here is how it should be done.
If you are using a public git repository make sure you have push permissions to the repository or fork the repository unless you are the real owner of the repository. Now you probably should be already aware that there is an actual `Browser Extension` for chrome and Mozilla, if not you should install that to make things easy instead of editing the URL(appending gitpod.io/#) all the time to open the repository in gitpod.
After you open the repository in gitpod run the below command
>> gp init
This will generate .gitpod.yml and .gitpod.Dockerfile files. Now modify the docker file something like below( for install redis-server in my case)
FROM gitpod/workspace-full
USER gitpod
RUN sudo apt-get update -q && \
    sudo apt-get install -yq redis-server



Then make sure you commit both the files and push them back to the repository.
Close the existing gitpod workspace and relaunch the workspace by going to the actual repository in GitHub with the latest commit. This should start installing the packages and open the workspace.
You can read more about this here at Installing missing packages
Alternatively, you can also install packaged with brew install <PackageName>.

Comments

Popular posts from this blog

Reasons not to buy Akaso action camera if you are from india

Recently I made a full review of the action camera I brought after doing a ton of research and time. Having used it for a couple of months I feel extremely glad that it meets up to my expectations. But recently, I accidentally tipped off the camera without an external case and it cracked my lens. This, in turn, added a shady spot on my phone or video and I cannot use that anymore (Some phones of the cracked lens below)     I immediately mailed the akaso team to ask if there is anything they could do but unfortunately, this was their response. Oops, that was not what I was expecting and then I asked them I could get any details of the replacement parts or anything like that so that I can order it online. But that didn't happen it took a lot of time for them to respond me back(I have been bugging them on Facebook and email).  But after some time they left me with this response which I had no other choice but to accept. After getting the 50%re...

Best and free NTFS tool for mac

Early recently I had my internal memory of my mac stocked up and I had to rely on storing my excess data onto my external hard disk which most have to do as we do not have an option otherwise to increase the internal storage of the machine itself. I pulled up my external hard disk and boom to my wonder it doesn't have the write permissions as it's of `NTFS` format. So after a quick search, it was evident that there are a lot of software that can mount my NTFS drive namely Microsoft NTFS for Mac by Paragon Software Microsoft NTFS for Mac by Tuxera But there all are restricted and you can use it for a limited period of time and they had hefty prices to pay for, So instead after a long search and trying out various tools here are my list of best picks for the free software available that will definitely help you out. easyuefi ~ ntfs-for-mac  ~ I myself been using it for a while now. mounty I will be updating the list every time when I find new software availabl...

Changing python version in gitpod

I have always had this problem modifying using a particular version of python on gitpod. Until I knew this simple trick to switch between the python versions. If you have not heard of gitpod its time for you to use it as running code online instead of local machine helps you when you have a CPU intensive processes and there are a lot of free to use online web apps that enable you to start with using powerful CPU and extends to GPU and TPU as well. I will be sharing a blog post soon on all the free tools you could use to boost up your productivity. So if you are already using gitpod and want to switch between python versions its simpler than you think Run this to check all the python versions available:    pyenv versions So to install a new version of python you simply have to run this:   pyenv install 3.7.6 (Or whatever version you want) That will basically download and install. Now you need to make sure to configure it for the existing workspace, t...