wikmd icon indicating copy to clipboard operation
wikmd copied to clipboard

Publish a new Docker image

Open kura opened this issue 3 years ago • 9 comments
trafficstars

Hey. Any chance you can publish newer Docker images? The latest image doesn't contain any of the recently added functionality.

kura avatar Apr 26 '22 13:04 kura

Could you be more specific? Normally docker will use the latest release of the wiki. How did you run docker?

Linbreux avatar Apr 26 '22 14:04 Linbreux

Docker using docker-compose (via Portainer). The source file that gets pulled from your Dockerfile on Docker Hub doesn't contain recently updated files, i.e.

$> ls /app/wikmd/
Dockerfile  LICENSE  README.md  TODO.md  __pycache__  docs  knowledge_graph.py  requirements.txt  static  templates  testfile  tests  wiki  wiki.py

Notice no config.py for instance.

kura avatar Apr 26 '22 14:04 kura

At a guess I would say it's because the overlay contains the source code archive from the time the Docker image was published.

For example the latest image layer is from a month ago and contains what I think is the source code archive file from when the image was posted to Docker Hub:

ADD e0dfb2cf69f9e165c0f7f9b55414d8133f601943ed98eb0dfb80ba85e3ebfe2c in /tmp/

I may be wrong, I'm not much of a Docker user but it seems like that might be the case.

If I delete the container and the image and start a new container with a fresh image it still contains the old version of the source code with the WIKMD_* environment variables in wiki.py.

$> grep WIKMD /app/wikmd/wiki.py 
WIKMD_LOGGING = os.getenv('WIKMD_LOGGING', 1)
WIKMD_LOGGING_FILE = os.getenv('WIKMD_LOGGING_FILE', "wikmd.log")
    if int(WIKMD_LOGGING) == 1:
        logging.basicConfig(filename=WIKMD_LOGGING_FILE, level=logging.INFO)

kura avatar Apr 26 '22 15:04 kura

hi @kura,

Sorry for the delay, I've been busy. I tried to build a new image, but got some problems implementing the latest code release. I'll try to do it this week.

Linbreux avatar May 05 '22 09:05 Linbreux

@Linbreux no worries. When I tested this locally I had to make a few changes to install the newest requirements, as well as add some now required environment variables to get it all working. And then I promptly forgot I did it and redeployed the container, wiping out my changes. :D

No rush, honestly this was more of a prompt that the image on Docker Hub was falling behind the code on GitHub 'cos I figured no automated image update was being made than any desperate need for the newest version (excluding maybe the favicon which would be a super nice-to-have.)

kura avatar May 05 '22 12:05 kura

@kura I think everything is working for know. Let me know if it isn't :D

Linbreux avatar Jun 05 '22 08:06 Linbreux

@Linbreux I just redeployed, pulling the latest image and it's working as expected.

In the future, when you publish a new release on GH is it going to auto-push a release to Docker Hub too?

kura avatar Jun 05 '22 11:06 kura

Hi thanks for letting me know. For now, I'll do it manualy. I'm looking into automating this.

Linbreux avatar Jun 05 '22 13:06 Linbreux

Ok, sounds good.

kura avatar Jun 05 '22 18:06 kura

Automated builds would be greatly appreciated. Docker Hub has a way to auto build on specific tags.

Oliver-Hanikel avatar Aug 19 '22 11:08 Oliver-Hanikel

Normaly the releases and main (edge) branch will be published automaticly to dockerhub thanks to @artivis

Linbreux avatar Aug 25 '22 23:08 Linbreux