From affbddc3cda9bda3089cb4dec5b30071dad2ac9a Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Tue, 13 Jan 2026 14:57:17 -0500 Subject: [PATCH] commented back in the 'USER: nonroot' line in the Dockerfile now that pushing to a server thru an ansible playbook has rendered all local WSL-2 considerations a nonissue; updated said deploy-playbook.yaml with new tasks to build out real docker container on server --- Dockerfile | 2 +- infra/deploy-playbook.yaml | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 394702d..8ff2f9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,6 @@ RUN python manage.py collectstatic ENV DJANGO_DEBUG_FALSE=1 RUN adduser --uid 1234 nonroot -# USER nonroot +USER nonroot CMD ["gunicorn", "--bind", ":8888", "core.wsgi:application"] \ No newline at end of file diff --git a/infra/deploy-playbook.yaml b/infra/deploy-playbook.yaml index 4cd242c..c1e38f8 100644 --- a/infra/deploy-playbook.yaml +++ b/infra/deploy-playbook.yaml @@ -18,9 +18,29 @@ - name: Reset ssh connection to allow the user/group change to take effect ansible.builtin.meta: reset_connection - - name: Run test container + - name: Export container image locally + community.docker.docker_image: + name: gamearray + archive_path: /tmp/gamearray-img.tar + source: local + delegate_to: 127.0.0.1 + + - name: Upload image to server + ansible.builtin.copy: + src: /tmp/gamearray-img.tar + dest: /tmp/gamearray-img.tar + + - name: Import container image on server + community.docker.docker_image: + name: gamearray + load_path: /tmp/gamearray-img.tar + source: load + force_source: true + state: present + + - name: Run container community.docker.docker_container: - name: testcontainer + name: gamearray + image: gamearray state: started - image: busybox - command: echo howdy partner \ No newline at end of file + recreate: true \ No newline at end of file