diff --git a/dev/Dockerfile b/dev/Dockerfile index 9e2e78468..d1606c40c 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -1,5 +1,16 @@ FROM ghcr.io/nationalarchives/tna-python-django:latest +USER root + +RUN apt-get update; \ + apt-get install -y ca-certificates curl gnupg; \ + install -m 0755 -d /etc/apt/keyrings; \ + curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \ + chmod a+r /etc/apt/keyrings/docker.gpg; \ + echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null; \ + apt-get update; \ + apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + COPY --chown=app dev/bin /home/app/.local/bin/dev RUN chmod +x -fR /home/app/.local/bin/dev ENV PATH="/home/app/.local/bin/dev:$PATH" @@ -12,6 +23,4 @@ RUN setup-npm COPY --chown=app . . -USER root - CMD ["welcome"] diff --git a/dev/bin/update-poetry b/dev/bin/update-poetry index 5874b8135..9b4bb5b8e 100755 --- a/dev/bin/update-poetry +++ b/dev/bin/update-poetry @@ -1,3 +1,7 @@ #!/bin/bash poetry update + +docker ps + +docker exec -it web poetry install --sync --no-root diff --git a/dev/bin/welcome b/dev/bin/welcome index 3012722ef..b8dd54f22 100755 --- a/dev/bin/welcome +++ b/dev/bin/welcome @@ -6,9 +6,8 @@ echo " ,'_\`--'____\`--'_\`. .--------------------------- echo " _: ____________ :_ | |" echo " | | ||::::::::::|| | | | Awaiting your command... |" echo " | | ||::::::::::|| | | | |" -echo " | | ||::::::::::|| | | | .----------------------------^" -echo " |_| |/__________\\| |_| |/" -echo " |________________|" +echo " |_| |/__________\\| |_| | .----------------------------^" +echo " |________________| |/" echo " __..-' \`-..__" echo " .-| : .----------------. : |-." echo " ,\\ || | |\\______________/| | || /." diff --git a/docker-compose.yml b/docker-compose.yml index 2d6c99db4..b5cb04f5e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,7 @@ services: restart: always volumes: - .:/app + - /var/run/docker.sock:/var/run/docker.sock depends_on: - web - db