29 Commits
0.1 ... 0.2

Author SHA1 Message Date
Thilo Graf
7d5a9053c0 refactor readme.yml: Update commit message for clarity 2024-05-12 18:39:50 +02:00
Thilo Graf
35ca9f5383 .translate.py: update link to repo 2024-05-12 18:36:05 +02:00
GitHub Actions
7578190044 readme: Automatically translated README to English 2024-05-12 16:29:36 +00:00
Thilo Graf
8e9ab5dd45 readme: update readme 2024-05-12 18:29:04 +02:00
GitHub Actions
5a86396362 readme: Automatically translated README to English 2024-05-06 16:10:00 +00:00
Thilo Graf
2ffb87279a readme: update readme 2024-05-06 18:09:29 +02:00
GitHub Actions
df1d702e48 readme: Automatically translated README to English 2024-05-06 16:03:03 +00:00
Thilo Graf
7d909ee1d6 readme: update readme 2024-05-06 18:02:25 +02:00
Thilo Graf
29f40aadaa docker-compose.yml: add volume for sources 2024-05-06 18:02:01 +02:00
Thilo Graf
69c960d91f Dockerfile: use latest base image as default 2024-05-06 17:59:51 +02:00
GitHub Actions
3ab7e43701 readme: Automatically translated README to English 2024-04-21 14:08:29 +00:00
Thilo Graf
086781a97d Change repository name 2024-04-21 16:07:43 +02:00
GitHub Actions
aaa6cd1227 readme: Automatically translated README to English 2024-04-16 14:03:57 +00:00
Thilo Graf
83547c7907 readme: update intro 2024-04-16 16:03:34 +02:00
Thilo Graf
436c7e9471 Dockerfile: use expicit base image dbt1/debian-tuxbox-base:v1.0 2024-04-14 18:00:38 +02:00
Thilo Graf
4de7617137 Dockerfile: Optimize SSH setup with environment variables for better flexibility 2024-04-11 20:01:23 +02:00
Thilo Graf
cc4c950b92 Standardize PATH during build
- Introduced a standard PATH environment variable definition during the
  image build phase to ensure consistency across different build environments.
- Removed redundant PATH argument definition to streamline Dockerfile
  and related configurations.
- Adjusted volume bindings in docker-compose.yml and Dockerfile to support
  a new directory structure for binaries.
- Enabled PATH environment variable pass-through in docker-compose.yml to
  ensure custom binary paths are accessible.
- Minor adjustments to script generation and directory initialization to enhance container setup processes.

This update optimizes the build environment and improves container
configuration by ensuring that essential tools and custom binaries are
readily available in the PATH across all stages of the build and
execution process.
2024-04-11 18:32:39 +02:00
Thilo Graf
e33f5ae552 docker-compose.yml: remove PATH from args
For use only environment defined PATH
2024-04-10 19:26:13 +02:00
Thilo Graf
6cdd9f8df4 docker-compose.yml: Update Docker Compose versiom to v3.8 and optimize env
- Upgraded Docker Compose file version from 3 to 3.8 to leverage new
  features and improvements.
- Reorganized the service configuration for tuxbox-build by
  specifying `container_name` at the appropriate level and shifting
  from inline `environment` variables to an external `.env` file for a cleaner and more maintainable setup.
- Removed redundant environment variable definitions and comments
  to streamline the configuration.

Better maintainability of Docker setup and ensures compatibility with newer Docker Compose features.
2024-04-10 18:11:31 +02:00
Thilo Graf
cde61c13d3 Dockerfile: move useradd after ARGs 2024-04-08 20:48:31 +02:00
Thilo Graf
ec3d514d7b Dockerfile: replace ${BASH_RC_FILE} as var for ${USER_DIR}/.bashrc 2024-04-08 20:36:34 +02:00
Thilo Graf
7ac438d22f docker-compose.yml: add missuíng data volume dir 2024-04-08 19:12:48 +02:00
Thilo Graf
9bc9df0d32 Dockerfile: ensure matching owners on user volume workdir 2024-04-07 17:35:37 +02:00
Thilo Graf
25c3f65111 create-env.sh: use GIT-default vars 2024-04-07 17:06:02 +02:00
GitHub Actions
269c095af9 readme: Automatically translated README to English 2024-04-07 14:21:44 +00:00
Thilo Graf
67d459b3da Dockerfile: remove unused ENV LIGHTTPD_CONF_INC 2024-04-07 16:20:23 +02:00
Thilo Graf
35f33c266b update readme 2024-04-07 16:20:23 +02:00
GitHub Actions
c8325696cf readme: Automatically translated README to English 2024-04-07 12:56:24 +00:00
Thilo Graf
bb757e70c0 readme: change order of exec variants, for easier sample as 1st option 2024-04-07 14:55:18 +02:00
7 changed files with 99 additions and 122 deletions

View File

@@ -6,7 +6,7 @@ def translate_readme(input_text, target_lang):
translated_text = translated.text translated_text = translated.text
# add hint for automatically translation # add hint for automatically translation
translated_text = f"Note: This is an automatically translated file. Original content from [here](https://github.com/dbt1/docker-tuxbox-build/blob/master/README-de.md):\n\n{translated_text}" translated_text = f"Note: This is an automatically translated file. Original content from [here](https://github.com/tuxbox-neutrino/docker-buildenv/blob/master/README-de.md):\n\n{translated_text}"
# Use this workaround, because translater breaks some links and anchors # Use this workaround, because translater breaks some links and anchors
translated_text = translated_text.replace("[Build Image](#Build Image)", "[Build Image](#build-image)") translated_text = translated_text.replace("[Build Image](#Build Image)", "[Build Image](#build-image)")

View File

@@ -37,6 +37,6 @@ jobs:
git config --global user.email "actions@github.com" git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions" git config --global user.name "GitHub Actions"
git add README-en.md git add README-en.md
git commit -m "readme: Automatically translated README to English" git commit -m "readme: Automatically translated README"
git push git push

View File

@@ -1,68 +1,8 @@
## Use the official Debian 11 image as a base ## Use the official Debian 11 image based up debian:bullseye-slim as a base
# FROM debian:bullseye-slim FROM dbt1/debian-tuxbox-base:latest
FROM dbt1/git-tools
### Install the required tools and packages
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
bzip2 \
binutils \
build-essential \
chrpath \
clisp \
coreutils \
cpio \
cppcheck \
curl \
debianutils \
default-jre \
diffstat \
diffutils \
doxygen \
file \
gcc \
gcc-multilib \
git-core \
gnupg \
gawk \
iputils-ping \
libc-bin \
libc6 \
libcapstone4 \
libegl1-mesa \
libsdl1.2debian \
libsdl2-dev \
libxml2-utils \
lighttpd \
linux-libc-dev \
locales-all \
locales \
make \
nano \
net-tools \
ninja-build \
openssh-server \
passwd \
procps \
pylint3 \
python \
python3 \
python3-git \
python3-jinja2 \
python3-pexpect \
rsync \
runit \
sed \
socat \
subversion \
sudo \
texinfo \
tree \
unzip \
util-linux \
wget
### Args ### Args
ARG PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ARG BUILDENV_GIT_URL=${BUILDENV_GIT_URL} ARG BUILDENV_GIT_URL=${BUILDENV_GIT_URL}
ARG BUILDENV_VERSION=${BUILDENV_VERSION} ARG BUILDENV_VERSION=${BUILDENV_VERSION}
ARG BUILDENV_PREFIX=${BUILDENV_PREFIX} ARG BUILDENV_PREFIX=${BUILDENV_PREFIX}
@@ -77,7 +17,6 @@ ARG HOST_PREFIX=${HOST_PREFIX}
ARG LOCALE_LANG=${LOCALE_LANG} ARG LOCALE_LANG=${LOCALE_LANG}
ARG LOCAL_HOSTNAME=${LOCAL_HOSTNAME} ARG LOCAL_HOSTNAME=${LOCAL_HOSTNAME}
ARG NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES} ARG NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}
ARG PATH=${PATH}
ARG QT_QUICK_BACKEND=${QT_QUICK_BACKEND} ARG QT_QUICK_BACKEND=${QT_QUICK_BACKEND}
ARG QT_XCB_GL_INTEGRATION=${QT_XCB_GL_INTEGRATION} ARG QT_XCB_GL_INTEGRATION=${QT_XCB_GL_INTEGRATION}
ARG START_PATH=${START_PATH} ARG START_PATH=${START_PATH}
@@ -93,6 +32,11 @@ ARG TB_VERSION=${TB_VERSION}
ARG XDG_CONFIG_HOME=${XDG_CONFIG_HOME} ARG XDG_CONFIG_HOME=${XDG_CONFIG_HOME}
ARG XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} ARG XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
## Add the user with default password
RUN groupadd -g "${USER_GROUP_ID}" "${USER_GROUP}" && \
useradd -m -u "${USER_ID}" -g "${USER_GROUP_ID}" -s /bin/bash "${USER}" && \
echo "${USER}:${USER_PASSWORD}" | chpasswd
## Set the desired Locale ## Set the desired Locale
RUN locale-gen ${LOCALE_LANG} && \ RUN locale-gen ${LOCALE_LANG} && \
dpkg-reconfigure --frontend=noninteractive locales && \ dpkg-reconfigure --frontend=noninteractive locales && \
@@ -128,7 +72,6 @@ ENV NO_AT_BRIDGE=1
## Create some basic directories and permissions for X-Server ## Create some basic directories and permissions for X-Server
RUN mkdir -p $XDG_RUNTIME_DIR && chown -R root:root $XDG_RUNTIME_DIR && chmod 0700 $XDG_RUNTIME_DIR RUN mkdir -p $XDG_RUNTIME_DIR && chown -R root:root $XDG_RUNTIME_DIR && chmod 0700 $XDG_RUNTIME_DIR
### Terminal
## Copy welcome message ## Copy welcome message
ENV BANNER_FILE=/etc/welcome.txt ENV BANNER_FILE=/etc/welcome.txt
COPY terminal-splash.txt /etc/terminal-splash.txt COPY terminal-splash.txt /etc/terminal-splash.txt
@@ -138,26 +81,22 @@ RUN cat /etc/terminal-splash.txt > ${BANNER_FILE} && \
echo "--------------------------------------------------------------" >> ${BANNER_FILE} echo "--------------------------------------------------------------" >> ${BANNER_FILE}
### ssh stuff ### ssh stuff
ENV SSHD_RUN_SERVICE_DIR="/etc/service/sshd"
ENV SSHD_RUN="${SSHD_RUN_SERVICE_DIR}/run"
RUN mkdir /var/run/sshd && \ RUN mkdir /var/run/sshd && \
ssh-keygen -A && \ ssh-keygen -A && \
mkdir -p /etc/service/sshd && \ mkdir -p ${SSHD_RUN_SERVICE_DIR} && \
echo '#!/bin/sh' > /etc/service/sshd/run && \ echo '#!/bin/sh' > ${SSHD_RUN} && \
echo 'exec /usr/sbin/sshd -D' >> /etc/service/sshd/run && \ echo 'exec /usr/sbin/sshd -D' >> ${SSHD_RUN} && \
chmod 755 /etc/service/sshd/run chmod 755 ${SSHD_RUN}
### Set timzone ### Set timzone
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
## Add the user with default password
RUN groupadd -g "${USER_GROUP_ID}" "${USER_GROUP}" && \
useradd -m -u "${USER_ID}" -g "${USER_GROUP_ID}" -s /bin/bash "${USER}" && \
echo "${USER}:${USER_PASSWORD}" | chpasswd
## Lighttpd setup and create the runit service for lighttpd ## Lighttpd setup and create the runit service for lighttpd
ENV LIGHTTPD_RUN="/etc/service/lighttpd/run" ENV LIGHTTPD_RUN="/etc/service/lighttpd/run"
ENV LIGHTTPD_CONFIG_PATH="/config/lighttpd" ENV LIGHTTPD_CONFIG_PATH="/config/lighttpd"
ENV LIGHTTPD_STD_CONFIG_FILE="${LIGHTTPD_CONFIG_PATH}/lighttpd.conf" ENV LIGHTTPD_STD_CONFIG_FILE="${LIGHTTPD_CONFIG_PATH}/lighttpd.conf"
ENV LIGHTTPD_CONF_INC="${LIGHTTPD_CONFIG_PATH}/lighttpd.conf.inc"
RUN mkdir -p /etc/service/lighttpd && \ RUN mkdir -p /etc/service/lighttpd && \
echo '#!/bin/sh' > ${LIGHTTPD_RUN} && \ echo '#!/bin/sh' > ${LIGHTTPD_RUN} && \
echo "if [ ! -d ${LIGHTTPD_CONFIG_PATH} ]; then" >> ${LIGHTTPD_RUN} && \ echo "if [ ! -d ${LIGHTTPD_CONFIG_PATH} ]; then" >> ${LIGHTTPD_RUN} && \
@@ -173,14 +112,14 @@ RUN mkdir -p /etc/service/lighttpd && \
echo "exec lighttpd -D -f ${LIGHTTPD_STD_CONFIG_FILE}" >> ${LIGHTTPD_RUN} && \ echo "exec lighttpd -D -f ${LIGHTTPD_STD_CONFIG_FILE}" >> ${LIGHTTPD_RUN} && \
chmod 755 ${LIGHTTPD_RUN} chmod 755 ${LIGHTTPD_RUN}
### generate content of start script ### ### Start generate content of start script ###
ENV CONTAINER_INIT_SCRIPT="/usr/local/bin/init.sh" ENV CONTAINER_INIT_SCRIPT="/usr/local/bin/init.sh"
RUN echo "#!/bin/bash" > ${CONTAINER_INIT_SCRIPT} && \ RUN echo "#!/bin/bash" > ${CONTAINER_INIT_SCRIPT} && \
echo "echo 'Initialize tuxbox-builder container...'" >> ${CONTAINER_INIT_SCRIPT} && \ echo "echo 'Initialize tuxbox-builder container...'" >> ${CONTAINER_INIT_SCRIPT} && \
echo "chown -R ${USER}:${USER_GROUP} ${USER_DIR} ${USER_VOLUME_DATADIR}" >> ${CONTAINER_INIT_SCRIPT} echo "chown -R ${USER}:${USER_GROUP} ${USER_DIR} ${USER_VOLUME_DATADIR}" >> ${CONTAINER_INIT_SCRIPT} && \
echo "usermod -aG sudo $USER" >> ${CONTAINER_INIT_SCRIPT}
## prepare git config ## prepare git config
#COPY .gitconfig ${USER_DIR}/.gitconfig
RUN mkdir -p ${XDG_CONFIG_HOME}/git && \ RUN mkdir -p ${XDG_CONFIG_HOME}/git && \
echo "echo -e '[user]\\n\\temail = ${GIT_EMAIL}\\n\\tname = ${GIT_USER}' > ${XDG_CONFIG_HOME}/git/config" >> ${CONTAINER_INIT_SCRIPT} && \ echo "echo -e '[user]\\n\\temail = ${GIT_EMAIL}\\n\\tname = ${GIT_USER}' > ${XDG_CONFIG_HOME}/git/config" >> ${CONTAINER_INIT_SCRIPT} && \
echo "chown -R ${USER}:${USER_GROUP} ${XDG_CONFIG_HOME}/git" >> ${CONTAINER_INIT_SCRIPT} && \ echo "chown -R ${USER}:${USER_GROUP} ${XDG_CONFIG_HOME}/git" >> ${CONTAINER_INIT_SCRIPT} && \
@@ -194,13 +133,15 @@ RUN echo "if [ ! -d ${START_PATH}/.git ]; then" >> ${CONTAINER_INIT_SCRIPT} && \
echo " rm -rf ${USER_DIR}/${BUILDENV_PREFIX}/tmp" >> ${CONTAINER_INIT_SCRIPT} && \ echo " rm -rf ${USER_DIR}/${BUILDENV_PREFIX}/tmp" >> ${CONTAINER_INIT_SCRIPT} && \
echo "else" >> ${CONTAINER_INIT_SCRIPT} && \ echo "else" >> ${CONTAINER_INIT_SCRIPT} && \
echo " echo 'Repository [${START_PATH}] already exists. Not touched!'" >> ${CONTAINER_INIT_SCRIPT} && \ echo " echo 'Repository [${START_PATH}] already exists. Not touched!'" >> ${CONTAINER_INIT_SCRIPT} && \
echo "fi" >> ${CONTAINER_INIT_SCRIPT} echo "fi" >> ${CONTAINER_INIT_SCRIPT} && \
echo "chown -R ${USER}:${USER_GROUP} ${USER_VOLUME_WORKDIR}" >> ${CONTAINER_INIT_SCRIPT}
## prepare profile ## prepare profile
COPY .bashrc ${USER_DIR}/.bashrc ENV BASH_RC_FILE=${USER_DIR}/.bashrc
RUN echo "sed -i 's|@START_PATH@|'"${START_PATH}"'|' ${USER_DIR}/.bashrc" >> ${CONTAINER_INIT_SCRIPT} && \ COPY .bashrc ${BASH_RC_FILE}
echo "sed -i 's|@VERSION@|'"${TB_VERSION}"'|' ${USER_DIR}/.bashrc" >> ${CONTAINER_INIT_SCRIPT} && \ RUN echo "sed -i 's|@START_PATH@|'"${START_PATH}"'|' ${BASH_RC_FILE}" >> ${CONTAINER_INIT_SCRIPT} && \
echo "sed -i 's|@HISTFILE@|'"${HISTFILE}"'|' ${USER_DIR}/.bashrc" >> ${CONTAINER_INIT_SCRIPT} echo "sed -i 's|@VERSION@|'"${TB_VERSION}"'|' ${BASH_RC_FILE}" >> ${CONTAINER_INIT_SCRIPT} && \
echo "sed -i 's|@HISTFILE@|'"${HISTFILE}"'|' ${BASH_RC_FILE}" >> ${CONTAINER_INIT_SCRIPT}
## prepare ssh config ## prepare ssh config
RUN echo "mkdir -p ${USER_DIR}/.ssh" >> ${CONTAINER_INIT_SCRIPT} RUN echo "mkdir -p ${USER_DIR}/.ssh" >> ${CONTAINER_INIT_SCRIPT}

View File

@@ -1,6 +1,6 @@
Dieses Repository enthält die notwendigen Dateien, um einen Docker-Container zu konfigurieren, zu erzeugen und zu starten, einschließlich `docker-compose.yaml`, `Dockerfile` und Skripte. Einige Umgebungsvariablen werden in eine `.env`-Datei hinterlegt, die mit einem Script `create-env.sh` erzeugt werden müssen, weil einige Einstellungen vom Host-System benötigt werden. Dieses Repository enthält die notwendigen Dateien, um einen Docker-Container zu konfigurieren, zu erzeugen und zu starten, einschließlich `docker-compose.yaml`, `Dockerfile` und Skripte. Einige Umgebungsvariablen werden in eine `.env`-Datei hinterlegt, die mit dem Script `create-env.sh` erzeugt werden müssen, damit einige Einstellungen vom Host-System übernommen werden können. Benötigt wird auch ein Basis Dockerimage, dass automatisch von Docker-Hub angefordert wird.
Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, die die notwendigen Voraussetzungen bereitstellen, um Flashimages und Pakete mit dem Yocto/OE Buildsystem bauen zu können. Die Verwendung dieses Repositorys soll helfen, Docker-Container zu erzeugen, die die notwendigen Voraussetzungen bereitstellen, um Flashimages und Pakete mit dem Yocto/OE Buildsystem bauen zu können.
- [1. Voraussetzungen](#1-voraussetzungen) - [1. Voraussetzungen](#1-voraussetzungen)
- [2. Vorbereiten](#2-vorbereiten) - [2. Vorbereiten](#2-vorbereiten)
@@ -18,7 +18,8 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
- [6. Verwenden des Containers](#6-verwenden-des-containers) - [6. Verwenden des Containers](#6-verwenden-des-containers)
- [6.1. Einloggen](#61-einloggen) - [6.1. Einloggen](#61-einloggen)
- [6.2. Buildumgebung nutzen](#62-buildumgebung-nutzen) - [6.2. Buildumgebung nutzen](#62-buildumgebung-nutzen)
- [7. Unterstützung](#7-unterstützung) - [7. Container aktualisieren](#7-container-aktualisieren)
- [8. Unterstützung](#8-unterstützung)
## 1. Voraussetzungen ## 1. Voraussetzungen
@@ -47,7 +48,7 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
### 2.1. Repository klonen und in das geklonte Repo wechseln ### 2.1. Repository klonen und in das geklonte Repo wechseln
```bash ```bash
git clone https://github.com/dbt1/docker-tuxbox-build.git && cd docker-tuxbox-build git clone https://github.com/tuxbox-neutrino/docker-buildenv.git && cd docker-buildenv
``` ```
### 2.2. Umgebungsvariablen konfigurieren ### 2.2. Umgebungsvariablen konfigurieren
@@ -78,6 +79,7 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
│ └── buildenv │ └── buildenv
├── Archive ├── Archive
├── bin ├── bin
├── sources
├── sstate-cache ├── sstate-cache
``` ```
@@ -144,12 +146,12 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
Docker-compose Wrapper ausführen: Docker-compose Wrapper ausführen:
**Hinweis:** Das vorangestellte `./` ist hier wichtig, da es sich um ein Wrapperscript handelt, welches sich im Repo befindet und das echte `docker-compose` aufruft, aber vorher automatisch eine `.env`-Datei wie in [Schritt 2.2](#22-umgebungsvariablen-konfigurieren) beschrieben erzeugt! Dieses Wrapperscript nimmt alle Parameter an, die für `docker-compose` relevant sind. Das bedeutet, dass z.B. eine alternative `.env-Datei` verwendet werden kann. Dies soll lediglich den Aufwand für die Befehlseingabe verringern.
```bash ```bash
./docker-compose build ./docker-compose build
``` ```
**Hinweis:** Das vorangestellte `./` ist hier zu beachten, da sich das Wrapperscript im Repo befindet. Das Wrapper-Script ruft `docker-compose` wie vorgesehen auf, allerdings nachdem automatisch eine `.env`-Datei, wie in [Schritt 2.2](#22-umgebungsvariablen-konfigurieren) beschrieben ist, erzeugt wurde! Dieses Wrapperscript nimmt alle Parameter an, die für `docker-compose` üblich sind. Es dient lediglich dazu, den Aufwand für die Befehlseingabe zur Erzeugung der Umgebungsvariablen, welche über die generierte `.env`-Datei bereitgestellt werden, zu verringern.
### 3.2 Beispiel 2 ### 3.2 Beispiel 2
Docker-compose ausführen: mit anderer `.env-Datei` Docker-compose ausführen: mit anderer `.env-Datei`
@@ -176,7 +178,7 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
## 6.1. Einloggen ## 6.1. Einloggen
Man sollte den Namen oder die ID kennen, um sich einloggen zu können. Führe `docker ps` aus, um zu sehen, welche Container gerade verfügbar sind: Man sollte den Namen oder die Container-ID kennen, um sich einloggen zu können. Führe `docker ps` aus, um zu sehen, welche Container gerade verfügbar sind:
```bash ```bash
docker ps docker ps
@@ -186,13 +188,14 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
Logge dich wie hier beispielsweise auf den Container mit der `Container-ID` **9d6e0d280a9e** oder dem `Container Namen` ein: Logge dich wie hier beispielsweise auf den Container mit der `Container-ID` **9d6e0d280a9e** oder dem `Container Namen` ein:
```bash ```bash
docker exec -it --user $USER 9d6e0d280a9e bash docker exec -it --user $USER tuxbox-build bash
``` ```
oder: oder:
```bash ```bash
docker exec -it --user $USER tuxbox-build bash docker exec -it --user $USER <CONTAINER ID> bash
``` ```
Es sollte etwa dieses Prompt erscheinen: Es sollte etwa dieses Prompt erscheinen:
@@ -235,9 +238,20 @@ Die Verwendung dieses Dockerimages soll helfen, Docker-Container zu erzeugen, di
- [http://IP<:PORT-NUMMER>](http://192.168.1.36:8080) - [http://IP<:PORT-NUMMER>](http://192.168.1.36:8080)
## 7. Unterstützung ## 7. Container aktualisieren
Für weitere Fragen oder Unterstützung öffne ein [Issue im GitHub](https://github.com/dbt1/docker-tuxbox-build/issues) oder melde Dich im [Forum](https://forum.tuxbox-neutrino.org/forum/viewforum.php?f=77). Entsprechend wie unter [Schritt 2.1](#21-repository-klonen-und-in-das-geklonte-repo-wechseln) angegeben, kann das Repository, dass die Rezeptur für den Container enthält, regelmäßig aktualisiert werden.
Dafür wechselt man in das Repository und führt dieses Kommando aus:
```bash
~/docker-buildenv$ git pull -r origin master
```
Anschließend wie [hier](#3-container-bauen) beschrieben, den Container erstellen lassen.
## 8. Unterstützung
Für weitere Fragen, Problemen oder Unterstützung öffne ein [Issue im GitHub](https://github.com/dbt1/docker-buildenv/issues) oder melde Dich im [Forum](https://forum.tuxbox-neutrino.org/forum/viewforum.php?f=77).

View File

@@ -1,7 +1,7 @@
Note: This is an automatically translated file. Original content from [here](https://github.com/dbt1/docker-tuxbox-build/blob/master/README-de.md): Note: This is an automatically translated file. Original content from [here](https://github.com/dbt1/docker-tuxbox-build/blob/master/README-de.md):
This repository contains the necessary files to configure, build, and launch a Docker container, including `docker-compose.yaml`, `Dockerfile`, and scripts. Some environment variables are stored in a `.env` file, which must be created with a `create-env.sh` script because some settings are required by the host system. This repository contains the necessary files to configure, build, and launch a Docker container, including `docker-compose.yaml`, `Dockerfile`, and scripts. Some environment variables are stored in a `.env` file, which must be created with the `create-env.sh` script so that some settings can be adopted by the host system. You also need a base Docker image that is automatically requested from Docker Hub.
The use of this Docker image is intended to help create Docker containers that provide the necessary requirements to be able to build Flash images and packages with the Yocto/OE build system. The use of this repository is intended to help create Docker containers that provide the necessary requirements to be able to build flash images and packages with the Yocto/OE build system.
- [1. Requirements](#1-requirements) - [1. Requirements](#1-requirements)
- [2. Prepare](#2-prepare) - [2. Prepare](#2-prepare)
@@ -19,7 +19,8 @@ The use of this Docker image is intended to help create Docker containers that p
- [6. Using the Container](#6-using-the-container) - [6. Using the Container](#6-using-the-container)
- [6.1. Login](#61-login) - [6.1. Login](#61-login)
- [6.2. Use build environment](#62-build-environment-use) - [6.2. Use build environment](#62-build-environment-use)
- [7. Support](#7-support) - [7. Update Container](#7-update-container)
- [8th. Support](#8-support)
## 1. Requirements ## 1. Requirements
@@ -48,7 +49,7 @@ The use of this Docker image is intended to help create Docker containers that p
### 2.1. Clone repository and switch to the cloned repo ### 2.1. Clone repository and switch to the cloned repo
```bash ```bash
git clone https://github.com/dbt1/docker-tuxbox-build.git && cd docker-tuxbox-build git clone https://github.com/tuxbox-neutrino/docker-buildenv.git && cd docker-buildenv
``` ```
### 2.2. Configure environment variables ### 2.2. Configure environment variables
@@ -79,6 +80,7 @@ The use of this Docker image is intended to help create Docker containers that p
│ └── buildenv │ └── buildenv
├── Archives ├── Archives
├── am ├── am
├── sources
├── sstate cache ├── sstate cache
``` ```
@@ -145,12 +147,12 @@ The use of this Docker image is intended to help create Docker containers that p
Run docker-compose wrapper: Run docker-compose wrapper:
**Note:** The preceding `./` is important here because it is a wrapper script that is in the repo and calls the real `docker-compose`, but beforehand it automatically creates a `.env` file like described in [Step 2.2](#22-configure-environment-variables)! This wrapper script takes all parameters relevant to `docker-compose`. This means that, for example, an alternative `.env file` can be used. This is simply intended to reduce the effort involved in entering commands.
```bash ```bash
./docker-compose build ./docker-compose build
``` ```
**Note:** The preceding `./` must be noted here as the wrapper script is in the repo. The wrapper script calls `docker-compose` as intended, but after automatically creating an `.env` file as described in [Step 2.2](#22-configure-environment-variables)! This wrapper script takes all parameters common to `docker-compose`. It only serves to reduce the effort required to enter commands to create the environment variables, which are provided via the generated `.env` file.
### 3.2 Example 2 ### 3.2 Example 2
Run docker-compose: with different `.env file` Run docker-compose: with different `.env file`
@@ -177,7 +179,7 @@ The use of this Docker image is intended to help create Docker containers that p
## 6.1. log in ## 6.1. log in
You should know the name or ID to log in. Run `docker ps` to see which containers are currently available: You should know the name or container ID to log in. Run `docker ps` to see which containers are currently available:
```bash ```bash
docker ps docker ps
@@ -187,13 +189,14 @@ The use of this Docker image is intended to help create Docker containers that p
For example, log in to the container with the `Container ID` **9d6e0d280a9e** or the `Container Name` like this: For example, log in to the container with the `Container ID` **9d6e0d280a9e** or the `Container Name` like this:
```bash ```bash
docker exec -it --user $USER 9d6e0d280a9e bash docker exec -it --user $USER tuxbox-build bash
``` ```
or: or:
```bash ```bash
docker exec -it --user $USER tuxbox-build bash docker exec -it --user $USER <CONTAINER ID> bash
``` ```
You should see something like this prompt: You should see something like this prompt:
@@ -212,7 +215,7 @@ The use of this Docker image is intended to help create Docker containers that p
## 6.2. Use build environment ## 6.2. Use build environment
After logging into the container, you are already in the directory where the init script is located. Now you can continue as described [here](https://github.com/tuxbox-neutrino/buildenv/blob/master/README.md). After logging into the container, you are already in the directory in which the init script is located. Now you can continue as described [here](https://github.com/tuxbox-neutrino/buildenv/blob/master/README.md).
The images and packages produced by the build system are made available via persistent volumes within your host home directory. By default, this location is intended for this: The images and packages produced by the build system are made available via persistent volumes within your host home directory. By default, this location is intended for this:
@@ -236,6 +239,17 @@ The use of this Docker image is intended to help create Docker containers that p
- [http://IP<:PORT NUMBER>](http://192.168.1.36:8080) - [http://IP<:PORT NUMBER>](http://192.168.1.36:8080)
## 7. Support ## 7. Update containers
For further questions or support, open an [Issue in GitHub](https://github.com/dbt1/docker-tuxbox-build/issues) or report in the [Forum](https://forum.tuxbox-neutrino.org /forum/viewforum.php?f=77). As stated in [Step 2.1](#21-clone-repository-and-switch-to-the-cloned-repo), the repository that contains the recipe for the container can be updated regularly.
To do this, go to the repository and run this command:
```bash
~/docker-buildenv$ git pull -r origin master
```
Then have the container created as described [here](#3-build-container).
## 8. Support
For further questions, problems or support, open an [Issue in GitHub](https://github.com/dbt1/docker-buildenv/issues) or report in the [Forum](https://forum.tuxbox-neutrino.org /forum/viewforum.php?f=77).

View File

@@ -9,14 +9,15 @@ TB_BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S')
USER=$(whoami) USER=$(whoami)
USER_ID=$(id -u) USER_ID=$(id -u)
USER_GROUP_ID=$(id -g) USER_GROUP_ID=$(id -g)
USER_DIR=${HOME} USER_DIR="${HOME}"
HOST_PREFIX=tuxbox HOST_PREFIX=tuxbox
BUILDENV_PREFIX="buildenv" BUILDENV_PREFIX="buildenv"
LOCAL_HOSTNAME=$(hostname) LOCAL_HOSTNAME=$(hostname)
ENABLE_UI_TOOLS="false" ENABLE_UI_TOOLS="false"
USER_VOLUME_WORKDIR=${USER_DIR}/${HOST_PREFIX} USER_VOLUME_BINDIR="${USER_DIR}/bin"
USER_VOLUME_WORKDIR="${USER_DIR}/${HOST_PREFIX}"
USER_VOLUME_WORKBINDIR="${USER_VOLUME_WORKDIR}/bin"
USER_VOLUME_DATADIR="${USER_VOLUME_WORKDIR}/.data" USER_VOLUME_DATADIR="${USER_VOLUME_WORKDIR}/.data"
TB_PATH="${USER_VOLUME_WORKDIR}/bin:${USER_DIR}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
HISTFILE_NAME=".bash_history" HISTFILE_NAME=".bash_history"
HISTFILE="${USER_VOLUME_DATADIR}/${HISTFILE_NAME}" HISTFILE="${USER_VOLUME_DATADIR}/${HISTFILE_NAME}"
@@ -28,9 +29,12 @@ GIT_USER="$(grep "${USER}" /etc/passwd | cut -d: -f5 | sed 's/,//g')"
if git --version &>/dev/null; then if git --version &>/dev/null; then
# Git is installed, try to get global values # Git is installed, try to get global values
GLOBAL_EMAIL=$(git config --global user.email) GLOBAL_EMAIL=$(git config --global user.email)
if [ -z "$GLOBAL_EMAIL" ]; then
GLOBAL_EMAIL=$GIT_EMAIL
fi
GLOBAL_USER=$(git config --global user.name) GLOBAL_USER=$(git config --global user.name)
if [ -z "$GLOBAL_USER" ]; then if [ -z "$GLOBAL_USER" ]; then
GLOBAL_USER=$USER GLOBAL_USER=$GIT_USER
fi fi
# Check if inside a Git repository # Check if inside a Git repository
@@ -77,7 +81,6 @@ LC_ALL=${LANG}
LOCALE_LANG=${LANG} LOCALE_LANG=${LANG}
LOCAL_HOSTNAME=${LOCAL_HOSTNAME} LOCAL_HOSTNAME=${LOCAL_HOSTNAME}
NVIDIA_VISIBLE_DEVICES=all NVIDIA_VISIBLE_DEVICES=all
PATH=${TB_PATH}
QT_QUICK_BACKEND=software QT_QUICK_BACKEND=software
QT_XCB_GL_INTEGRATION=xcb_egl QT_XCB_GL_INTEGRATION=xcb_egl
START_PATH=${USER_VOLUME_WORKDIR}/${BUILDENV_PREFIX} START_PATH=${USER_VOLUME_WORKDIR}/${BUILDENV_PREFIX}
@@ -91,6 +94,8 @@ USER_ID=${USER_ID}
USER_PASSWORD=${USER} USER_PASSWORD=${USER}
USER_VOLUME_WORKDIR=${USER_VOLUME_WORKDIR} USER_VOLUME_WORKDIR=${USER_VOLUME_WORKDIR}
USER_VOLUME_DATADIR=${USER_VOLUME_DATADIR} USER_VOLUME_DATADIR=${USER_VOLUME_DATADIR}
USER_VOLUME_BINDIR=${USER_VOLUME_BINDIR}
USER_VOLUME_WORKBINDIR=${USER_VOLUME_WORKBINDIR}
TB_VERSION=${TB_VERSION} TB_VERSION=${TB_VERSION}
XDG_CONFIG_HOME=/home XDG_CONFIG_HOME=/home
XDG_RUNTIME_DIR=/tmp/runtime-root XDG_RUNTIME_DIR=/tmp/runtime-root

View File

@@ -1,8 +1,13 @@
version: '3' version: '3.8'
services: services:
tuxbox-build: tuxbox-build:
container_name: tuxbox-build
image: tuxbox-build image: tuxbox-build
environment:
- PATH=${USER_VOLUME_WORKBINDIR}:${USER_VOLUME_BINDIR}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env_file:
- .env
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
@@ -20,7 +25,6 @@ services:
- LOCALE_LANG=${LOCALE_LANG} - LOCALE_LANG=${LOCALE_LANG}
- LOCAL_HOSTNAME=${LOCAL_HOSTNAME} - LOCAL_HOSTNAME=${LOCAL_HOSTNAME}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES} - NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}
- PATH=${PATH}
- QT_QUICK_BACKEND=${QT_QUICK_BACKEND} - QT_QUICK_BACKEND=${QT_QUICK_BACKEND}
- QT_XCB_GL_INTEGRATION=${QT_XCB_GL_INTEGRATION} - QT_XCB_GL_INTEGRATION=${QT_XCB_GL_INTEGRATION}
- START_PATH=${START_PATH} - START_PATH=${START_PATH}
@@ -38,11 +42,8 @@ services:
- USER_VOLUME_DATADIR=${USER_VOLUME_DATADIR} - USER_VOLUME_DATADIR=${USER_VOLUME_DATADIR}
- XDG_CONFIG_HOME=${XDG_CONFIG_HOME} - XDG_CONFIG_HOME=${XDG_CONFIG_HOME}
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} - XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
container_name: tuxbox-build
env_file:
- .env
#environment:
#- BUILDENV_VERSION=3.2.4
devices: devices:
- /dev/dri:/dev/dri - /dev/dri:/dev/dri
ports: ports:
@@ -57,9 +58,11 @@ services:
- ${USER_DIR}/sstate-cache:${USER_DIR}/sstate-cache - ${USER_DIR}/sstate-cache:${USER_DIR}/sstate-cache
- ${USER_DIR}/Archive:${USER_DIR}/Archive - ${USER_DIR}/Archive:${USER_DIR}/Archive
- ${USER_DIR}/.ccache:${USER_DIR}/.ccache - ${USER_DIR}/.ccache:${USER_DIR}/.ccache
- ${USER_DIR}/bin:${USER_DIR}/bin - ${USER_DIR}/sources:${USER_DIR}/sources
- ${USER_VOLUME_WORKDIR}/bin:${USER_VOLUME_WORKDIR}/bin - ${USER_VOLUME_BINDIR}:${USER_DIR}/bin
- ${USER_VOLUME_WORKBINDIR}:${USER_VOLUME_WORKDIR}/bin
- ${USER_DIR}/.ssh:${USER_DIR}/.ssh - ${USER_DIR}/.ssh:${USER_DIR}/.ssh
- ${USER_VOLUME_DATADIR}:/data
- ${USER_VOLUME_WORKDIR}/.config:/config - ${USER_VOLUME_WORKDIR}/.config:/config
- ${USER_VOLUME_WORKDIR}/.config/git/config:${XDG_CONFIG_HOME}/git - ${USER_VOLUME_WORKDIR}/.config/git/config:${XDG_CONFIG_HOME}/git
- /tmp/.X11-unix:/tmp/.X11-unix - /tmp/.X11-unix:/tmp/.X11-unix