Closed mbhkoay closed 3 years ago
Thanks for reaching out and for using Kill the Newsletter!
You’re running into issues because the architecture of the application changed between the version from you which you copied the Dockerfile
and version 1.0.1. I’m not planning on supporting Docker right now; instead I’m favoring the executable binaries you may find at https://github.com/leafac/kill-the-newsletter/releases/tag/v1.0.1 (By the way, they were created with caxa, which is another project of mine.)
The specific issue you’re running into is that the Dockerfile
says to run npm ci --production
, which attempts to install only the production dependencies, but that doesn’t install TypeScript, which is necessary to build the application, and when it tries to build you get an error saying tsc
(the TypeScript compiler) isn’t found.
The way I’d go about this if I were to do a Docker build is to start with an image that has Node.js installed and first run npm ci
. That command will install all the dependencies (including development ones) and build the application. I’d then run npm dedupe --production
, to strip away the development dependencies (that step removes tsc
, but it’s fine because we won’t use it anymore). Finally, to start the application, I’d use node lib/index.js
, which runs the JavaScript file produced by the TypeScript compiler.
Good luck. Let me know how it goes.
Hi, love the idea of subscribing to newsletters through RSS.
I have totally no background in coding but have just followed instructions to install dockers previously. Have a little experience with dockers and debian but not much else. Currently using Unraid as my os, and would like to host my own deployment using docker.
I have successfully run the linux release in the directory /mnt/user/Mine/kill-the-newsletter
After that, I created a Dockerfile following the sample from: https://github.com/leafac/kill-the-newsletter/blob/b9907a8021cebd6cd4a4b3131fd31ac5aa0a2e37/Dockerfile. The only changes made was to the port numbers, changing from 8000 to 11000.
Upon running
docker build -t kill-the-newsletter .
, system returns the following error:So I made another attempt, by downloading the source code from https://github.com/leafac/kill-the-newsletter/archive/refs/tags/v1.0.1.zip, extracting them to the folder /mnt/user/Mine/kill-the-newsletter, then executing
docker build -t kill-the-newsletter .
again. The following appeared:Any help is appreciated.