mirror of
https://github.com/tuxbox-neutrino/docker-buildenv.git
synced 2025-08-27 13:42:42 +02:00
Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7d5a9053c0 | ||
|
35ca9f5383 | ||
|
7578190044 | ||
|
8e9ab5dd45 | ||
|
5a86396362 | ||
|
2ffb87279a | ||
|
df1d702e48 | ||
|
7d909ee1d6 | ||
|
29f40aadaa | ||
|
69c960d91f | ||
|
3ab7e43701 | ||
|
086781a97d | ||
|
aaa6cd1227 | ||
|
83547c7907 | ||
|
436c7e9471 | ||
|
4de7617137 | ||
|
cc4c950b92 | ||
|
e33f5ae552 | ||
|
6cdd9f8df4 | ||
|
cde61c13d3 | ||
|
ec3d514d7b | ||
|
7ac438d22f | ||
|
9bc9df0d32 | ||
|
25c3f65111 | ||
|
269c095af9 | ||
|
67d459b3da | ||
|
35f33c266b | ||
|
c8325696cf | ||
|
bb757e70c0 |
2
.github/scripts/translate.py
vendored
2
.github/scripts/translate.py
vendored
@@ -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)")
|
||||||
|
2
.github/workflows/readme.yml
vendored
2
.github/workflows/readme.yml
vendored
@@ -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
|
||||||
|
|
||||||
|
107
Dockerfile
107
Dockerfile
@@ -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}
|
||||||
|
36
README-de.md
36
README-de.md
@@ -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).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
38
README-en.md
38
README-en.md
@@ -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).
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user