Skip to content

Commit 37d45dd

Browse files
committed
fix: running container under root user
1 parent d17b5ec commit 37d45dd

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM condaforge/miniforge3:4.12.0-0
22

33
RUN conda install -y gcc pip poetry=1.1.7 git
4-
RUN mkdir /workdir
4+
RUN mkdir /workdir && chmod 777 /workdir
55
RUN git config --global --add safe.directory /workdir
66
WORKDIR /workdir
77

Jenkinsfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pipeline {
2121
agent {
2222
node {
2323
label 'ec2-fleet'
24-
customWorkspace "${PROJECT_NAME}-${BUILD_NUMBER}"
2524
}
2625
}
2726

@@ -48,7 +47,6 @@ pipeline {
4847
agent {
4948
node {
5049
label 'ec2-fleet'
51-
customWorkspace "${PROJECT_NAME}-${BUILD_NUMBER}"
5250
}
5351
}
5452

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include .config.mk
77
DOCKER = docker
88
DOCKER_RUN := $(DOCKER) run --rm -i
99
WORKDIR :=/workdir
10-
DOCKER_COMMAND := $(DOCKER_RUN) -v $(PWD):$(WORKDIR):Z -w $(WORKDIR) \
10+
DOCKER_COMMAND := $(DOCKER_RUN) -u "$(shell id -u)":"$(shell id -g)" -v $(PWD):$(WORKDIR):Z -w $(WORKDIR) \
1111
-e XDG_CONFIG_HOME=$(WORKDIR) \
1212
-e XDG_CACHE_HOME=$(WORKDIR) \
1313
-e POETRY_CACHE_DIR=$(WORKDIR)/.cache \
@@ -49,15 +49,15 @@ run: install ## purge build time artifacts
4949
$(DOCKER_COMMAND) bash
5050

5151
.PHONY:clean
52-
clean: build-image ## purge build time artifacts
53-
$(POETRY_COMMAND) run rm -rf dist/ build/ coverage/ pypoetry/ pip/ **/__pycache__/ .pytest_cache/ .cache .coverage
52+
clean: ## purge build time artifacts
53+
rm -rf dist/ build/ coverage/ pypoetry/ pip/ **/__pycache__/ .pytest_cache/ .cache .coverage
5454

5555
.PHONY:changelog
5656
changelog: install ## print the next version of the change log to stdout
5757
$(POETRY_COMMAND) run semantic-release changelog --unreleased
5858

5959
.PHONY:install
60-
install: clean ## install development and build time dependencies
60+
install: build-image ## install development and build time dependencies
6161
$(POETRY_COMMAND) install --no-interaction
6262

6363
.PHONY:lint

0 commit comments

Comments
 (0)