How to allow to upload files in docx format in docker

I have a project with a uploadBox that runs without any problem.
But, when I run the project using docker, the uploadBox doesn’t work and I face an error that says I can’t upload the file with docx format!
I don’t see any file format error, when I run the project without using Docker.
I did a bit of searching and found that I had to add a config in docker-compose file to allow to upload of the files in formats like docx. but I don’t know how?
I’ll be grateful if you guide me.

Your post is written in a way that only someone who actualy uses uploadBox is able to understand/help.
The chances that such someone stumbles accross your post in this forum are probably not the highest.

Instead, I would suggest to share information about how you started the container (=exact command or in case you used a docker-compose.yml, its content).

1 Like

Thanks for the guide.
But I think the answer to my question has nothing to do with how I used the upload box in my project…
In general, my question is how in docker-compose we can config to allow docx files to be uploaded in the project.

Anyway, I share my docker-compose file:

version: '3.6'
    build: myProject
    container_name: myProject_app
      // some environments... 
      - db
    restart: always
      - 8081:8080
    build: mysql
    container_name: myProject_mysql
    command: --default-authentication-plugin=mysql_native_password

and this is my Dockerfile:

FROM {a url...}
RUN apt-get update; apt-get install -y fontconfig libfreetype6
COPY myProject.jar /srv
CMD java -jar /srv/myProject.jar

So this is a custom implementation of yours?
I though you might be using an existing image, which would have allowed to look into the description.

What I can tell is that myProject.jar already must have everything preconfigured to accept the docx type. The problem you experience is not related to docker. As docker has no idea what the compiled code inside the jar even does.

This is still a blackbox.


Yes, it is a custom implementation.

But, when I run the main Java file of the project, the project runs properly and I can upload different files.

The problem just appears when I run the myProject.jar with the docker-compose up command!!

did you try to copy your jar at a different place on your host and run it from the different location?

If you develop the application yourself, it might be a ressource in the run profile of your ide or even environment parameters set in your run profile that make the difference.

It just doesn’t make sense that running the application in a container (=isolated process with isolted filesytem) should result in different application behavior.

1 Like

No, I didn’t try to run the jar file from another location…

Exactly because the problem is a little strange, I don’t have any idea what to do.
I wish it was possible to you to look at my project remotely to see where the problem comes from…

Well, then please try? Like explained above:

Also, you’re hiding too much from us:

You seem to think it’s not important, which may be true, but other details that may explain the behavior are lacking.

1 Like

Ok, I’ll try that.

Yes, maybe the problem is exactly related to those sections I hid.
But unfortunately, due to some issues, I can not publish those in the public community. That’s why I asked to show the project to someone if possible.