https://dev.to/kcdchennai/apt-update-vs-apt-upgrade-whats-the-difference-2ff8

Use command below :
sudo dpkg -i PACKAGEFILE
reference :
https://askubuntu.com/questions/1407494/screen-share-not-working-in-ubuntu-22-04-in-all-platforms-zoom-teams-google-m
lsof -i :8000
ss -apt
first , purge main package name :
sudo apt-get purge mariadb-server
then
sudo apt autoremove
then run this command to find all packages that may are related to the package which you want to purge :
sudo dpkg -l | grep mariadb
after that purg services that are returned one by one
On building a docker image you may want to have some variables (you can also have them in docker-compose)
you can define ARG in docker file (you can also set default value for them in docker file)
for example :
# in docker file
ARG some_variable_name = xxxx
ARG uid
#on building image :
$ docker build --build-arg some_variable_name=a_value
ENV variables are also available during the build, as soon as you introduce them with an ENV instruction. However, unlike ARG, they are also accessible by containers started from the final image. ENV values can be overridden when starting a container, more on that below.
# no default value
ENV hey
# a default value
ENV foo /bar
# or ENV foo=/bar
# ENV values can be used during the build
ADD . $foo
# or ADD . ${foo}
# translates to: ADD . /bar
on running docker :
$ docker run -e "env_var_name=another_value" alpine env
for example :
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
COPY and ADD are both Dockerfile instructions that serve a similar purpose. They let you copy files from a specific location into a Docker image.
ADD does that same but in addition, it also supports 2 other sources.
COPY takes in a source and destination. It only lets you copy in a local or directory from your host (the machine-building the Docker image) into the Docker image itself.
for example :
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
for example:
# Set working directory
WORKDIR /var/www
for example:
USER $user
public function get_shop_products($shop_id)
{
$shop = Shop::query()
->where('id' , $shop_id)
->first();
$shop->setRelation('products' , $shop->products()->paginate(10));
return new ShopProductsResource($shop);
}
Check 80 port on your server :
sudo netstat -tulpn | grep :80
In my case I saw my 80 port have gotten by Nginx but I want to give it to Apache so I used this command :
sudo systemctl stop nginx
sudo systemctl start apache2.service
and it worked perfectly
In this post, I want to write about a miracle in the software development world.
Imagine you can create your database entities with some clicks; you have many types of fields that are built in that software.
For a programmer who codes in pure PHP or python with a front-end framework, it takes more than 1 month to create a blog and shop website, but you can have all of that in one or two days with Frappe; Wow 🙂 What amazing!
You can read more about it on its official website: frappeframework.com
I also created a GitHub repository to keep some sample script codes that during working with frappe you probably need to use.
You can have it here (don’t forget to give it a start and communicate):
The article in the link below helps in this way.
Check it out.
https://maj0rmil4d.medium.com/how-to-run-our-own-smart-dns-to-bypass-geo-restrictions-beeeab4f82d7