Saving n8n docker image

Good morning everyone,

I know I am taking a chance asking this here, but I hope someone has come across this before and can help.

I am running n8n on a on a hostinger vps in docker and I am trying to get the Atlassian MCP to work with n8n. I spent the evening yesterday trying to come to grips with Docker and I have managed to get python installed on a custom n8n image thanx to a Youtube video video and this post, How to connect mcp-atlassian to n8n? . But whenever I docker down and docker up the image I created resets to “default”. I gather that this is the expected behaviour.

The thing is the image I got with my server does not, so there is a way to stop the reset, but I don’t know how. I am assuming it has something to do with the volumes part of the docker-compose.yml file
image

but I am not if it is and if it is, I am not sure what to change it to.

Can someone please help me out with this, any help would be appreciated.

You are right, this is very much expected. The container is created from an image and whatever you do inside the container is gone when you down it (except the things stored in the volume), and when you up the container, a new container is created from the original image again.

The best way to go about your problem is to indeed create a custom image from an existing that you are using and add python to it, so that when the container starts, it has it too.

The link you posted above provides an example of how to do it. Doing it this way ensures the python is there when you start a new container. If it is not there, you must be using the original container in your docker compose file, instead of a new custom one, you’ve created.

1 Like

Hey @FlatulentFowl

You can check your yml, there no need really to make seperate build, just include namely python, in ure docker-compose.yml

RUN apk add --no-cache \
    curl \
    git \
    build-base \
    chromium \
    bash \
    tar \
    xz \
    util-linux \
    coreutils \
    python3 \
    py3-pip

If you include this, it will build first time, but if nothing changes it will keep it etc.

You volumes are just mounts, n8n_data is a docker volume, /home/node/.n8n is the user path, and /files is ure local. But this won’t keep python installed, unless you install there but I think best way is just including it inside your docker compose file.

If you would like feel free to share the yml u have for both server, and can try pointout.

Hope this helps,

Samuel

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.