Lately, there have been a few inquiries about deploying the source code of my website. Unfortunately for my own convenience, Less configuration to think about. very few of my resources are deployed directly or entirely with Docker. You can however get an instance of this website running very quickly with linux containers. My personal deployment strategy is mostly ad hoc, so a linux container is the easiest way for me to deliver a demo of the source code.
Installing and
running lxc on your system should theoretically be the hardest part.
To get this up and running, create a container and change to its working
directory.
shell
lxc-create --name app --template download -- --dist alpine --release 3.14 --arch amd64 --keyserver hkp://keyserver.ubuntu.com
cd /var/lib/lxc/app
Remove
We can generate an empty container with
the command lxc-create -n empty -t none, but the generated config file will be
empty too.
the contents of the container file system. The
rootfs will be replaced with the website’s file system.
shell
rm -rf rootfs/*Download the website here,
verify its
checksum, and
extract the contents into rootfs.
shell
wget https://www.thedroneely.com/download/rootfs.tar.gz
tar --numeric-owner -xzvf rootfs.tar.gz -C rootfs/Start the website and get its IP address.
shell
lxc-start -n app
lxc-ls -fThe output should look something like the following.
shell
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
app RUNNING 0 - x.x.x.x - falseCockpit CMS can be accessed at
http://x.x.x.x/cockpit. Isso’s administration
page can be accessed at http://x.x.x.x/isso/admin. The default
credentials
Disclaimer: You are responsible
for securing your stack.
are listed below.
shell
# Cockpit CMS default credentials
Username: admin
Password: admin
# Isso default credentials
Password: changethisIf this was too long to read, then see the condensed version below.
shell
lxc-create -n app -t download -- --dist alpine --release 3.10 --arch amd64
cd /var/lib/lxc/app
rm -rf rootfs/*
wget https://www.thedroneely.com/download/rootfs.tar.gz
tar --numeric-owner -xzvf rootfs.tar.gz -C rootfs/
lxc-start -n app
lxc-ls -f
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.