diff --git a/.gitignore b/.gitignore index 2eb51d1c4..350a4de3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.Dockerfile dist* node_modules/ assets/icons diff --git a/Makefile b/Makefile index 807d36de1..8cdf04ce3 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ db ?= -cf -CONTAINER_RUNNER ?= docker compose +CONTAINER_RUNNER ?= podman .PHONY: help help: @@ -122,7 +122,8 @@ frontend-%: node_modules well-known --frontend-%; .PHONY: --frontend-test --frontend-test: karma.conf.cjs - npx -- karma start --conf karma.conf.cjs $(WATCH) + @echo Karma frontend tests are currently work in progress and have been temporarily disabled. +# npx -- karma start --conf karma.conf.cjs $(WATCH) .PHONY: --frontend-test-watch --frontend-test-watch: WATCH=--single-run false @@ -180,6 +181,8 @@ well-known/.well-known: # run-s frontend:build --parallel "frontend:build:watch" "yesod:start" --docker-build-%: - $(CONTAINER_RUNNER) build $(FRADRIVE_SERVICE) + rm -f .Dockerfile + ln -s docker/$(FRADRIVE_SERVICE)/Dockerfile .Dockerfile + $(CONTAINER_RUNNER) build -v $(PWD):/tmp/fradrive --tag $(FRADRIVE_SERVICE) --file $(PWD)/.Dockerfile --docker-run-%: - $(CONTAINER_RUNNER) run -u `id -u`:`id -g` --env FRADRIVE_MAKE_TARGET=$* $(FRADRIVE_SERVICE) \ No newline at end of file + $(CONTAINER_RUNNER) run -v $(PWD):/tmp/fradrive --env FRADRIVE_MAKE_TARGET=$* $(FRADRIVE_SERVICE) \ No newline at end of file diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 40ff16187..6f664a6f2 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -1,4 +1,3 @@ -# TODO: switch to uniworx registry debian image FROM registry.uniworx.de/uniworx/containers/debian:12.5 # Basic dependencies @@ -17,9 +16,7 @@ RUN n 20.17.0 ARG PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} -RUN --mount=type=bind,source=.,target=/tmp${PROJECT_DIR} \ - cp -r /tmp${PROJECT_DIR}/* ${PROJECT_DIR} -RUN chmod -R 777 ${PROJECT_DIR} +RUN cp -r /tmp${PROJECT_DIR}/* ${PROJECT_DIR} WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR}