-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from coenjacobs/devcontainer-implementation
Devcontainer implementation
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dockerComposeFile": "../docker-compose.yml", | ||
"service": "builder", | ||
"workspaceFolder": "/mozart/", | ||
"shutdownAction": "stopCompose" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
FROM composer:2.7.7 | ||
|
||
FROM php:8.3.9-cli-alpine AS base | ||
|
||
FROM base as builder | ||
RUN apk update && apk add git | ||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
COPY ./composer.json /mozart/ | ||
WORKDIR /mozart/ | ||
RUN composer install | ||
|
||
FROM builder as packager | ||
RUN rm -rf vendor | ||
RUN composer install --no-dev -o | ||
|
||
FROM base AS application | ||
RUN mkdir project | ||
WORKDIR /project/ | ||
COPY --from=builder /mozart/ /mozart/ | ||
COPY --from=packager /mozart/ /mozart/ | ||
COPY ./bin/ /mozart/bin/ | ||
COPY ./src/ /mozart/src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.4' | ||
services: | ||
builder: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
target: builder | ||
volumes: | ||
- .:/mozart/ | ||
command: /bin/sh -c "while sleep 1000; do :; done" |