Docker Community Forums

Share and learn in the Docker community.

Php update in docker image


(Bokkoman) #1

Hello people who read this,
I am new to docker and this is my first post.

I have been trying to run a docker image on my synology nas. It is for a pocketmine server.
But the latest pocketmine release wants to use php v7.2.0 or newer. But the image i get from the docker store has v7.2.0rc5.
And somehow that doesn’t work.

So I want to try to update it, but don’t know how. How do I update the php in the docker image? Because latest version is 7.2.8.

Kind regards and thanks in advance,
bokkoman


(David Maze) #2

It looks like the standard php image has 7.2.8, and if you start your Dockerfile with FROM php:7.2 you’ll get something new enough.


(Bokkoman) #3

Thank you for your reply!
And how would i do that? It’s not my docker image. Where do i set that “from”?


(Martin Terp) #4

How did you start/build your container?


(Bokkoman) #5

I searched the image on my Synology and installed it.


(Martin Terp) #6

im no expert on the synology docker gui, but lets see what we can do :slight_smile:

Which image are you installing? and does it allow you to point to a folder where your files are?


(Bokkoman) #7

I’m installing this: https://hub.docker.com/r/cloudavionics/pocketmine-mp/

You can point to a folder somehow. I’m not at home right now, so can’t show you what it looks.


(Martin Terp) #8

its okay, just curious.

So, in this case, there is no other versions of this image, and they did not link it to github, so we can see how they build the image.

So im afraid that you need to find another image, since updating php in the container is not something you would do.

If you fx. check this one out: https://github.com/circleeh/docker-pocketmine
And open the Dockerfile, you can see that this image is build with PHP7.2
So maybe try and give that a go :slight_smile:


(Bokkoman) #9

I’ll give it a try soon. I’m at a bachelor party today lol.
Thanks for helping, I’ll let you know.


(Bokkoman) #10

I can’t get it to work. Whatever I do, i never see the server running in minecraft.
I also don’t know how to map a directory to the image for storage.


(Martin Terp) #11

On the other image, there was a option for this?
I have a synology nas myself, i can test it tomorrow to see if i can get it to work.


(Bokkoman) #12

Well, there should be a way to make data persistant or something.
I have tried several, but none actually update to latest stable version of pocketmine (v3.1.1).
If you are willing to try it, let me know which one works.
It seems this one is popular: https://github.com/5t111111/docker-pocketmine-mp
But that one updates to latest beta, but i want stable. And with the one in post one I actually saw the server in the minecraft app, with all others I didn’t.