Default Install
sudo apt-get install nginx -y
Look in /var/www/html/
See also jekyll Strategy C
Basics
- docker run: Create a new container from an image
- start: Start stopped containers. @see Docker start
- exec: Execute commands on a running container!
- container remove: Delete a container. @see container remove
- rm: Remove a container. @see Docker rm
- help: Run docker exec –help for more information on a command.
@see Docker Exec @see Docker exec, what does it do @see Docker run
@see Docker stop @see Docker ps
@see Docker Exec What does it do
It should all be in here:
alias dks="docker start"
alias dkl="docker container ls -a"
docker container cp ./AwsConfigAll.zip epic_payne:/home/ubuntu/.ssh/.
docker exec -it epic_payne bash
dkl -s
docker rename epic_payne ubuntu-complete
docker stop ubuntu-complete
git clone git@github.com:charliecalvert/elven-web.git
Alpine
Add bash to Alpine:
apk add bash bash-doc bash-completion
Other notes
None of these notes amount too much They’re all half formed:
like this:
sudo add-apt-repository 'deb-src https://nginx.org/packages/ubuntu/ jammy nginx'
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
export key=ABF5BD827BD9BF62
## Replace $key with the corresponding $key from your GPG error.
After you replace the key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
sudo apt update
sudo apt install nginx
sudo systemctl start nginx
curl localhost
export release=JammyJellyfish
deb https://nginx.org/packages/ubuntu/ $release nginx
deb-src https://nginx.org/packages/ubuntu/ $release nginx
sudo apt update
sudo apt install nginx
like this:
sudo add-apt-repository 'deb-src https://nginx.org/packages/ubuntu/ jammy nginx'
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
export key=ABF5BD827BD9BF62
## Replace $key with the corresponding $key from your GPG error.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
sudo apt update
sudo apt install nginx
sudo systemctl start nginx
curl localhost
Other Techniques
Here we create or build a Docker container with a jekyl siter in it.
Dokerfile:
FROM nginx
COPY myblog01/_site /usr/share/nginx/html
Serve:
#! /bin/bash
export site_name="myblog01"
cd $site_name
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
--publish [::1]:4000:4000 \
jekyll/jekyll \
jekyll serve
Build:
#! /bin/bash
export site_name="myblog01"
export JEKYLL_VERSION=latest
cd $site_name
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it jekyll/builder:$JEKYLL_VERSION \
jekyll build --watch
Subdomains
git clone git@github.com:charliecalvert/charliecalvert.github.io.git
cd /etc/nginx/
cat nginx.conf
cd sites-enabled/
cat default
cd ../sites-available/
cat default
cat default.old
cd sites-enabled/
Create your A record:
ping go.elven.work
ping elven.work
sudo mkdir /var/www/html/go.elven.work
ll /var/www/html/
sudo nano /var/www/html/go.elven.work/index.html
sudo nano /etc/nginx/sites-available/go.elven.work
sudo nginx -t # Check your work
sudo ln -s /etc/nginx/sites-available/go.elven.work .
sudo systemctl restart nginx
sudo certbot -d go.elven.work --expand