Custom image not work on server

Hi friends,

I have built custom template and made some database changes with a page on my local computer,
Now I want to pack all the changes in the container and move them to the production server via docker,
I have done some steps but no use , nor templates or functionities worked.

Steps I have done:

1.I changed codes and added custom template
2. I have built image and pushed it docker.io
3. I changed production servers’ docker image with - tutor config save --set DOCKER_IMAGE_OPENEDX=docker.io/myusername/openedx:mytag command (I replaced the image with my custom).
4. I built the image and stoped and started services.
but no use, not template files fetched by image or database changes.

While pulling Openedx image, I see those lines:

Pulling image docker.io/overhangio/openedx:13.0.3
docker pull docker.io/overhangio/openedx:13.0.3
13.0.3: Pulling from overhangio/openedx
Digest: sha256:1c93f0e77f39e52e090b4854e89431e966886cf052af76f260ee41dc96ef8476
Status: Downloaded newer image for overhangio/openedx:13.0.3
docker.io/overhangio/openedx:13.0.3

Why it fetching from overhangio?.

But yml files has my own image path.

Please share your mind, thank in advance!

What is the output of the following commands?

tutor config printvalue DOCKER_IMAGE_OPENEDX
tutor images pull openedx

@regis Local computer Output of command : tutor config printvalue DOCKER_IMAGE_OPENEDX - docker.io/{My docker username}/openedx:lilac.3

Output of tutor images pull openedx command

Pulling image docker.io/{My docker username}/openedx:lilac.3
docker pull docker.io/{My docker username}/openedx:lilac.3
lilac.3: Pulling from {My docker username}openedx
Digest: sha256:1aa56e8b10eab5afc591bea4e8d98eb9709c6e4a77deea36059ee6a158d16e02
Status: Image is up to date for {My docker username}/openedx:lilac.3
docker.io/{My docker username}/openedx:lilac.3

Production :

Output of command : tutor config printvalue DOCKER_IMAGE_OPENEDX - docker.io/{My docker username}/openedx:lilac.3

Output of tutor images pull openedx command this gives me permission error I use it with sudo then I get > :warning: You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the ‘docker’ group. (see Redirecting…)

Pulling image docker.io/overhangio/openedx:13.0.3
docker pull docker.io/overhangio/openedx:13.0.3
13.0.3: Pulling from overhangio/openedx
Digest: sha256:1c93f0e77f39e52e090b4854e89431e966886cf052af76f260ee41dc96ef8476
Status: Image is up to date for overhangio/openedx:13.0.3
docker.io/overhangio/openedx:13.0.3

@regis I fixed permission error now I get this output :

Pulling image docker.io/{My docker username}/openedx:lilac.3
docker pull docker.io/{My docker username}/openedx:lilac.3
lilac.3: Pulling from {My docker username}/openedx
Digest: sha256:1aa56e8b10eab5afc591bea4e8d98eb9709c6e4a77deea36059ee6a158d16e02
Status: Image is up to date for {My docker username}/openedx:lilac.3
docker.io/{My docker username}/openedx:lilac.3

@regis after fixig permission I built the image and run tutor local start (even tutor dev runserver lms) I got this error : "Access denied for user ‘openedx’@‘172.18.0.7’

I used “sudo” then services run, but no use for changes, nor themes fetched nor MySQL’s data.

I think the all problem is related permissions, How can I properly use permission without sudo?.
Is there any user with docker full permissions?.
How can I manage permission?

You should almost never run Tutor as root. When you run “sudo” then tutor is run from a different project root, with a different config.yml file, and thus different configuration values (DOCKER_IMAGE_OPENEDX for instance).

Stop everything:

sudo tutor local stop
sudo tutor dev stop

From then on don’t run “sudo” ever again.

tutor local stop
tutor dev stop

Second, you are running tutor v13, thus your for of edx-platform should be based on top of the Maple branch. Given that you have DOCKER_IMAGE_OPENEDX=docker.io/{My docker username}/openedx:lilac.3 it looks like you made your fork on top of the Lilac branch. This is not going to work.

Start back from scratch and do things slowly and carefully. You’ll get there.

@regis, thank you very much for replying,
I did all things as you said,
Currently, I have completed some tasks on my local computer and I want to update them for my AWS server,

While developing new features I used volumes after compilation of tasks, I build a new image and pushed it to my docker hub account, on the AWS side I pulled the image and build it, but there is no changes I made, I have controlled the changes entering to it with docker exec -it tutor_local_cms-worker_1 /bin/bash command,

I don’t know how can I handle this situation?.

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