diff --git a/.lighthouse/pipeline-rust-test.yaml b/.lighthouse/pipeline-rust-test.yaml index ffc5881..7959062 100644 --- a/.lighthouse/pipeline-rust-test.yaml +++ b/.lighthouse/pipeline-rust-test.yaml @@ -66,7 +66,6 @@ spec: value: "gcr.io/kaniko-project/executor:v1.12.1" - name: EXTRA_ARGS value: - - --target=tester - --cache=true - --cache-copy-layers - --cache-repo=harbor.fizz.buzz/kanikocache/cache diff --git a/docker/natter_development/Dockerfile b/docker/natter_development/Dockerfile new file mode 100644 index 0000000..38f2de1 --- /dev/null +++ b/docker/natter_development/Dockerfile @@ -0,0 +1,4 @@ +FROM rustlang/rust:nightly-alpine3.17 AS builder + +RUN apk add --no-cache musl-dev +RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache diff --git a/docker/natter_development/Makefile b/docker/natter_development/Makefile new file mode 100644 index 0000000..c6fce8f --- /dev/null +++ b/docker/natter_development/Makefile @@ -0,0 +1,32 @@ +SHELL := bash +.ONESHELL: +.SHELLFLAGS := -eu -o pipefail -c +.DELETE_ON_ERROR: +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules +OS:=$(shell uname -s) + +ifeq ($(origin .RECIPEPREFIX), undefined) + $(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later) +endif +.RECIPEPREFIX = > + +IMAGE_NAME:=natter-development +TARGET := + +.PHONY: help +help: +> @grep -h "##" $(MAKEFILE_LIST) | grep -v grep | sed -E 's/^([^:]*): *## */\1: /' + +.PHONY: build +build: ## Build the docker image. +> docker build --tag $(IMAGE_NAME) --target=$(TARGET) --file Dockerfile . + +.PHONY: shell +shell: ## Launch an interactive shell inside the docker image with the source repository mounted at /source. +shell: build +> docker run --rm -i -t --entrypoint /bin/sh --mount type=tmpfs,destination=/tmp -v "$$(readlink -f ../../):/source" --workdir=/source $(IMAGE_NAME) + +.PHONY: clean +clean: +> docker rmi $(IMAGE_NAME)