Merge branch 'master' of https://git.cluster.fun/averagemarcus/blog
This commit is contained in:
commit
f1a7bd7dff
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
||||
.DEFAULT_GOAL := default
|
||||
|
||||
IMAGE ?= docker.cloud.cluster.fun/averagemarcus/blog:latest
|
||||
IMAGE ?= docker.cluster.fun/averagemarcus/blog:latest
|
||||
|
||||
.PHONY: test # Run all tests, linting and format checks
|
||||
test: lint check-format run-tests
|
||||
|
16
app.js
16
app.js
@ -23,18 +23,30 @@ const striptags = require('striptags');
|
||||
|
||||
const port = process.env.PORT || 8000;
|
||||
|
||||
app.disable('x-powered-by');
|
||||
app.use(compress());
|
||||
app.use(express.static(__dirname + '/build'));
|
||||
|
||||
// Lets try and slow down some of those exploit crawlers
|
||||
app.use("/", require('./filterRoutes'));
|
||||
|
||||
// Handle some iOS icon 404s
|
||||
app.get("/apple-touch-icon*", function(req, res) {
|
||||
res.sendFile(__dirname + '/build/images/favico/' + req.url, () => {
|
||||
res.sendFile(__dirname + '/build/images/favico/apple-touch-icon.png');
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/favicon.png", function(req, res) {
|
||||
res.sendFile(__dirname + '/build/images/favico/apple-touch-icon.png');
|
||||
});
|
||||
|
||||
app.get("/robots.txt", function(req, res) {
|
||||
res.send("User-agent: * Disallow: ");
|
||||
})
|
||||
|
||||
app.get(/\/(feed|rss)\/?$/, function(req, res) {
|
||||
res.redirect('/feed.xml');
|
||||
app.get(/(\/(feeds?|rss|atom)\/?|feed.xml|rss.xml|index.rss|feed.rss)$/, function(req, res) {
|
||||
res.redirect(301, '/feed.xml');
|
||||
})
|
||||
|
||||
app.get("/healthz", function(req, res) {
|
||||
|
BIN
src/images/favico/apple-touch-icon-precomposed.png
Normal file
BIN
src/images/favico/apple-touch-icon-precomposed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
src/images/favico/apple-touch-icon.png
Normal file
BIN
src/images/favico/apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
src/images/podman-macos.png
Normal file
BIN
src/images/podman-macos.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 403 KiB |
@ -14,13 +14,22 @@ There has been quite a bit of reaction to this news..."
|
||||
2021-09-01: Added note about socket bugfix PR
|
||||
|
||||
2021-09-01: Added troubleshooting section about port forwarding bug
|
||||
|
||||
2021-09-04: Added note about switching to Podman on Windows
|
||||
|
||||
2021-09-04: Added update about port forwarding PR
|
||||
|
||||
2021-09-04: Added note about M1 Mac support
|
||||
|
||||
2021-09-04: Added volume mount limitation
|
||||
|
||||
2021-09-04: Added podman-macos utility
|
||||
</details>
|
||||
|
||||
Docker has [recently announced](https://www.docker.com/blog/updating-product-subscriptions/) that Docker Desktop will soon require a subscription and, based on the size of your company, may require a paid subscription. (It remains free for personal use)
|
||||
|
||||
There has been quite a bit of reaction to this news:
|
||||
|
||||
|
||||
<figure class="center" markdown="1">
|
||||
|
||||
[![](https://tweet.cluster.fun/1432720164169076755)](https://twitter.com/QuinnyPig/status/1432720164169076755)
|
||||
@ -28,7 +37,6 @@ There has been quite a bit of reaction to this news:
|
||||
<figcaption>Corey isn't too impressed with the news</figcaption>
|
||||
</figure>
|
||||
|
||||
|
||||
<figure class="center" markdown="1">
|
||||
|
||||
[![](https://tweet.cluster.fun/1432974196632604676)](https://twitter.com/manuel_zapf/status/1432974196632604676)
|
||||
@ -38,7 +46,6 @@ There has been quite a bit of reaction to this news:
|
||||
|
||||
Depending on which side your opinions lie, you might be looking for alternatives. Well it just so happens that [Podman](https://podman.io) posted this well-timed tweet:
|
||||
|
||||
|
||||
<figure class="center" markdown="1">
|
||||
|
||||
[![](https://tweet.cluster.fun/1432800271873323010)](https://twitter.com/Podman_io/status/1432800271873323010)
|
||||
@ -50,6 +57,8 @@ So, lets give it a whirl...
|
||||
|
||||
## Replacing Docker with Podman (on Mac)
|
||||
|
||||
> Note: This currently doesn't work for Macs with an M1 CPU. I've come across this post in my search - [Running Podman Machine on the Mac M1](https://www.cloudassembler.com/post/podman-machine-mac-m1/) - but I've not confirmed if it works or not.
|
||||
|
||||
1. `brew install podman`
|
||||
2. Wait while brew downloads, builds and installs...
|
||||
3. Create a virtual machine for Podman to run from:
|
||||
@ -80,6 +89,10 @@ So, lets give it a whirl...
|
||||
5. `alias docker=podman` (Add this to your `.bashrc` (if using Bash), `.zshrc` (if using ZSH) or whatever the correct file for your shell is)
|
||||
6. 🎉
|
||||
|
||||
## Replacing Docker with Podman (on Windows)
|
||||
|
||||
I don't currently have access to a Windows machine where I can test this out but [Frank](https://twitter.com/frank_k_p) sent me this [on Twitter](https://twitter.com/frank_k_p/status/1433490007088668672) that covers the process needed for those on Windows with WLS2 - [How to run Podman on Windows with WSL2](https://www.redhat.com/sysadmin/podman-windows-wsl2).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Ok, so it's not all *completely* pain free, there are a few issues you might hit...
|
||||
@ -104,6 +117,19 @@ This seems to happen (for me at least) when I've previously run `podman machine
|
||||
|
||||
> UPDATE: Looks like this will be fixed in an upcoming release. - [PR](https://github.com/containers/podman/pull/11342)
|
||||
|
||||
### Volume mounts
|
||||
|
||||
```sh
|
||||
✨ podman run --rm -it -v $(pwd):/usr/share/nginx/html:ro --publish 8000:80 docker.io/library/nginx:latest
|
||||
Error: statfs /Users/marcus/web: no such file or directory
|
||||
```
|
||||
|
||||
Podman machine currently has no support for mounting volumes from the host machine (your Mac) into the container on the virtual machine. Instead, it attepts to mount a directory matching what you specified from the _virtual machine_ rather than your Mac.
|
||||
|
||||
This is a fairly big issue if you're looking for a smooth transition from Docker Desktop.
|
||||
|
||||
There's currently a fairly active [issue](https://github.com/containers/podman/issues/8016) about this limitation but as of right now there doesn't seem to be a nice workaround or solution.
|
||||
|
||||
### Automatic published port forwarding
|
||||
|
||||
```sh
|
||||
@ -125,7 +151,7 @@ The first is passing in the `--network bridge` flag to the podman command, e.g.
|
||||
|
||||
The other, more perminant option is to add `rootless_networking = "cni"` under the `[containers]` section of your `~/.config/containers/containers.conf` file.
|
||||
|
||||
To follow the progress of this bug, please refer to the [issue](https://github.com/containers/podman/issues/11396).
|
||||
To follow the progress of this bug, please refer to the [issue](https://github.com/containers/podman/issues/11396). **UPDATE**: This has now been merged and is expected to be released in v3.3.2 in the next few days or so.
|
||||
|
||||
## short-name resolution
|
||||
|
||||
@ -192,6 +218,17 @@ This property contains a list of all the registries that will be checked (in ord
|
||||
|
||||
With that change made we can `exit` from the virtual machine and Podman should then search for any short name images using these registries from now on.
|
||||
|
||||
## GUI Replacement
|
||||
|
||||
For those that like to have a graphical UI to manage / monitor their running containers [Victor](https://github.com/heyvito) has released [podman-macos](https://github.com/heyvito/podman-macos) that provides a tiny taskbar utility for Podman.
|
||||
|
||||
<figure class="center" markdown="1">
|
||||
|
||||
![](/images/podman-macos.png)
|
||||
|
||||
<figcaption>Podman GUI for MacOS</figcaption>
|
||||
</figure>
|
||||
|
||||
## Wrap Up
|
||||
|
||||
I'm sure there's many more inconsistencies but so far I'm pretty impressed. I'm plan to try using Podman instead of Docker for a while and see how I get on. I'll try and update this post with anything more I find out.
|
||||
|
@ -14,7 +14,7 @@
|
||||
<li>
|
||||
<article class="post">
|
||||
<h2 class="post-title">
|
||||
<a class="post-link" href="/{{ this.path }}">{{ this.title }}</a>
|
||||
<a class="post-link" href="/{{ this.path }}/">{{ this.title }}</a>
|
||||
</h2>
|
||||
|
||||
<div class="post-meta feather_type">
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div class="post-preview">
|
||||
{{{ markdown this.summary }}}
|
||||
<a class="full-post-link" href="/{{ this.path }}">Continue reading...</a>
|
||||
<a class="full-post-link" href="/{{ this.path }}/">Continue reading...</a>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
@ -18,6 +18,7 @@
|
||||
<!-- Twitter Do Not Track -->
|
||||
<meta name="twitter:dnt" content="on">
|
||||
|
||||
<link rel="apple-touch-icon" href="/images/favico/apple-icon-180x180.png"/>
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/images/favico/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/images/favico/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/images/favico/apple-icon-72x72.png">
|
||||
|
@ -8,7 +8,7 @@
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
|
||||
<h2 class="post-title" itemprop="name headline">
|
||||
<a class="post-link" href="/{{ path }}">{{ title }}</a>
|
||||
<a class="post-link" href="/{{ path }}/">{{ title }}</a>
|
||||
</h2>
|
||||
|
||||
<div class="post-meta feather_type">
|
||||
|
Loading…
Reference in New Issue
Block a user