0xffff-one / flarum-0x

🔧 Customized Flarum for the 0xFFFF Community.
https://0xffff.one
MIT License
44 stars 5 forks source link

Optimizing the DevContainer Build Process #44

Closed zgq354 closed 1 year ago

zgq354 commented 1 year ago

Current situation: DevContainer requires pulling an image at startup, and building directly from the Dockerfile is time-consuming. Currently, a separate dev-container branch is used to build the image through GitHub Action. This approach can be challenging when resolving conflicts after merging changes. Therefore, there is a need to optimize the process.

Branch main: https://github.com/0xffff-one/0xffff-flarum/blob/50bbe59/.devcontainer/docker-compose.yml#L5

services: 
  app:
    image: ghcr.io/0xffff-one/0xffff-flarum-devcontainer:latest

Branch dev-container: https://github.com/0xffff-one/0xffff-flarum/blob/d4f91f7/.devcontainer/docker-compose.yml#L5

services: 
  app:
    build:
      context: .
      dockerfile: Dockerfile

A possible solution: In the CI process of the main branch, the image could be replaced with build / dockerfile by applying a patch or similar method, and then continue with the build process.

for more details at 0xFFFF Discord Channel: https://discord.com/channels/835068992006651934/1103181702865629264