Turun,

A basic image is really easy. It’s basically just

Dockerfile


<span style="color:#323232;">FROM debian  # start with a minimal Linux system. There are probably better options than debian. Some images are made especially for docker (i.e. very minimal and light weight). 
</span><span style="color:#323232;">RUN apt install dependencies  # do what ever you need to get your app running. 
</span><span style="color:#323232;">RUN echo "options and stuff" >> /etc/a/config/file  # you can also edit system files
</span><span style="color:#323232;">COPY . /app  # copy your project into the docker container.
</span><span style="color:#323232;">EXPOSE 8080  # doesn't actually do anything, but documents where the app will be listening
</span><span style="color:#323232;">CMD server-binary run /app/main.php  # I have actually no idea how php server stuff works
</span>

(Docs docs.docker.com/reference/dockerfile/)

Then people can run your project with docker.

Edit: checking the readme some small changes would be required. Config.php should read in environment variables and the DB init SQL should be run automatically somehow.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • ethstaker
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • ngwrru68w68
  • Durango
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • tacticalgear
  • mdbf
  • kavyap
  • khanakhh
  • provamag3
  • osvaldo12
  • GTA5RPClips
  • cubers
  • cisconetworking
  • everett
  • tester
  • modclub
  • megavids
  • Leos
  • normalnudes
  • anitta
  • JUstTest
  • lostlight
  • All magazines