Restricting Access with nginx-proxy: Basic Auth and IP Allowlists

nginx-proxy can do basic authentication and access limiting

This article is a note on access restriction using Docker’s jwilder/nginx-proxy. Incidentally, this is information that is also written in the official documentation Basic authentication Create a .htpasswd folder inside the nginx-proxy folder Create a file named after the domain, in htpasswd format, under the .htpasswd folder Set .hpasswd as a volume in docker-compose.yml .htpasswd In the .htpasswd folder, create a file in htpasswd format named after the custom domain you want to protect with basic authentication [Read More]

Setting Up RSS-Bridge with Docker Compose

rssbridge on docker-compose

It supports many social networks such as Facebook and Instagram, and acts as a hub-like fetching server that turns their updates into RSS. If setting up a server sounds like too much trouble, or you just want to try it out, you might use one of the instances that anyone can access RSS-Bridge on Docker I am building it with docker this time as well [Read More]
OSS 

Switching My RSS Aggregator from ttrss to FreshRSS on Docker

freshrss on docker-compose

For about three years I had been running tinytinyRSS, or ttrss, on Docker. There is still nothing wrong with it, but when updating it with docker-compose I also have to take dependencies such as mercury and opencc into account, and at this point FreshRSS has a simpler configuration and a good reputation, and FreeRSS came to be supported in Reeder5, the Mac app, as well, so I changed my RSS aggregator. [Read More]
rss 

Self-hosting Nitter, a Twitter Web Client, with Docker

Twitter Web client on Docker

Restrictions imposed by Twitter 2023/6/30 Because of Twitter's API restrictions and the restriction on viewing without logging in, fetching Twitter posts and so on through nitter is no longer possible Building Nitter with Docker as described below is still possible, but it is of no use unless the restrictions on the Twitter side are lifted Nitter is a Web client for Twitter, and you can view it without having a Twitter account you can view it without logging in to Twitter no ads are inserted you can turn the timeline of a user or keyword you are interested in into RSS This time I build it myself with Docker, but Nitter has an official site and instances, and using those is fine, so there is no need to force yourself to build it [Read More]

Testing SMTP Sending with Postfix and MailHog on Docker

Testing SMTP on Docker(postfix+mailhog)

I had a situation where I wanted to send SMTP from inside a Docker container, so I gave it a try using mailhog.

I based this almost entirely on the article above (in Japanese)

What I changed

  • Changed the Dockerfile image to almalinux
    Because centos8 is past EOL and an error came up when fetching packages
  • Added privileged: true to docker-compose.yml
    It did start with cap-add as well, but errors were being emitted

Send test

  • Once it has finished starting up, check inside the Docker container whether postfix can send on port 25.
  • Since relayhost uses mailhog’s port 1025, it is not actually sent to the real destination, so there is nothing to worry about
  • On the host side you can send on port 1025 as is
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 0d95f56f386c.example.com ESMTP Postfix
mail from: <[email protected]>
250 2.1.0 Ok
rcpt to: <[email protected]>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject: mail testing
it is testing
.
250 2.0.0 Ok: queued as 367DF26008A

Leave the Docker container, access http://localhost:8025 in a browser on the host side, and if the mail has arrived you are done

Trying MinIO, an Amazon S3 Compatible Object Storage, on Docker

testing minio on docker

minio is an Amazon S3 compatible object storage

It is provided for platforms such as Mac/Windows/Linux as well, but Docker is handy when you just want to try it out a little, so I will build it with docker-compose

Once you have started it with docker-compose up -d,

  1. Connect to http://localhost:9000 in a browser
  2. Log in with admin/password
  3. Create a bucket with Create Bucket
  4. Upload files and folders

The interface is exactly the same as Amazon S3, so AWS-CLI can be used too, but in order to connect to minio you need to specify --endpoint-url .
Amazon S3 is charged by usage, so if you self-host minio you can use it for free.

Converting a docker run Command into docker-compose Format

docker command convert to docker-compose format

When you use DockerHub , you see instructions written in the style of “run docker run … to start it”, don’t you. And then there are many occasions where you want to fold that docker run … into docker-compose. If you are used to YAML or TOML in the docker-compose format, you can simply write the version, put down the service name and then fill in the contents of the service, but lining up the indentation and so on really is a hassle. [Read More]

Running Dnsmasq in Docker as an Internal DNS Server for a Home LAN

Resolving my own domain inside the LAN with dnsmasq on Docker

On my home server I use my own domain and run several servers on it, but from inside the home LAN the traffic goes through the router, so accessing them with my own domain does not reach the servers inside the house It is easier to understand if you refer to this article When you only have a few PCs and devices, you can write the entries in each hosts file instead of introducing dnsmasq, but I also wanted to manage the hosts file in one place, so I built dnsmasq as a DNS server inside the LAN with Docker [Read More]
dns 

A Docker Image That Cannot Be Deleted

conflict: unable to delete

Symptoms I tried to delete an image file in Docker and got an error Copy $ docker rmi d56 Error response from daemon: conflict: unable to delete d562087633bf (cannot be forced) - image has dependent child images Forcing the deletion Copy $ docker rmi d56 -f Error response from daemon: conflict: unable to delete d562087633bf (cannot be forced) - image has dependent child images Cause The error seems to say that child image files depend on it. [Read More]