Skip to content

How to better custom our own image? #181

Closed Answered by jaydrogers
lam0819 asked this question in Q&A
Discussion options

You must be logged in to vote

Great stuff!

Few quick comments:

Reduce the copy command

Minimize your layers as much as possible. Rather than copying each file, you can copy the entire directory (and its sub directories & files) all at once. That's what I do here:

COPY --chmod=755 etc/s6-overlay/ /etc/s6-overlay/

Running a queue & scheduler

I see you're injecting these scripts to run the services. Although that may work, you lose the supervision of the process.

Instead, consider separating out your processes into multiple containers -- so you would have:

  1. PHP
  2. Scheduler
  3. Queue

See these examples:
https://serversideup.net/open-source/docker-php/docs/lara…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jaydrogers
Comment options

Answer selected by jaydrogers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants