From 56a8509b5d3c9607a63f986959f697a3f7b503b4 Mon Sep 17 00:00:00 2001 From: m-guberina <gubi.guberina@gmail.com> Date: Sun, 29 Sep 2024 19:41:21 +0200 Subject: [PATCH] can run docker with root being the user, things work, just could be prettier --- Dockerfile | 4 ++++ docs/installing_ubuntu.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a0fae18..8591d43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,10 @@ WORKDIR /usr/local/ur_simple_control # copy repo to workdir COPY . . +# install pyhton3-tk without questions +ARG DEBIAN_FRONTEND=noninteractive +ENV TZ=Europe/Stockholm + RUN apt update && apt upgrade RUN apt install -y python3 \ python3-pip \ diff --git a/docs/installing_ubuntu.md b/docs/installing_ubuntu.md index bf06533..d9c6e76 100644 --- a/docs/installing_ubuntu.md +++ b/docs/installing_ubuntu.md @@ -57,7 +57,7 @@ After installing Docker, navigate to this project's directory in your CLI. Then: 1. build the image with "docker build -t ur_simple_control ." TODO: add volume mounting (copy Marcus' approach with a user and /home/user/) and networking (put it to host) -2. run the image with "docker run --rm -it --user root ur_simple_control" +2. run the image FIRST RUN "xhost +", THEN RUN "docker run --rm -it --net=host -e DISPLAY=$DISPLAY -v /tmp:/tmp ur_simple_control" #### option 2) Native installation 1. Either create a disk partition for Ubuntu on your hard drive, or use an external hard drive. In the first case, you might need to shrink your existing partition. Searching for "how to create a disk partition [your_OS]" or "install ubuntu on [your_OS]" will get you all the information you need. Ideally, back up your data before any of this (you should be doing this in general as it's good practice). -- GitLab