diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index b36ff398..6e30f683 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -14,13 +14,17 @@ services: vertex: build: context: ../server - dockerfile: docker/bundle.Dockerfile - args: - - APP_KIND=main + dockerfile: docker/bundle.dev.Dockerfile + environment: + - APP_KIND=main + volumes: + - ../server:/build/server vertex-kernel: build: context: ../server - dockerfile: docker/bundle.Dockerfile - args: - - APP_KIND=kernel + dockerfile: docker/bundle.dev.Dockerfile + environment: + - APP_KIND=kernel + volumes: + - ../server:/build/server diff --git a/server/docker/bundle.dev.Dockerfile b/server/docker/bundle.dev.Dockerfile new file mode 100644 index 00000000..b40e3bcd --- /dev/null +++ b/server/docker/bundle.dev.Dockerfile @@ -0,0 +1,15 @@ +FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS build-stage + +WORKDIR /build + +COPY . . + +RUN apk add --no-cache git + +RUN go install -mod=mod github.com/githubnemo/CompileDaemon + +ARG APP_KIND=main + +EXPOSE 80 7500 7502 7504 7505 7506 7508 7510 7512 7514 7516 7518 + +ENTRYPOINT CompileDaemon -build='go build ./cmd/'"$APP_KIND" -directory=.