Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Docker-Compose #4020

Merged
merged 6 commits into from
Jan 25, 2021
Merged

DietPi-Software | Docker-Compose #4020

merged 6 commits into from
Jan 25, 2021

Conversation

Joulinar
Copy link
Collaborator

@Joulinar Joulinar commented Dec 29, 2020

Status: Testing

  • implementation
  • testing

Reference: #3078

Commit list/description:

  • DietPi-Software | Docker-Compose: reserve Software ID 187, get ready for further implementation.
  • DietPi-Software | Docker-Compose: Add dependency for Docker and Python (pip)
  • DietPi-Software | Docker-Compose: add install and removal process
  • DietPi-Software | Python (pip): enable pipweels as additional pip repository for ARMv6 and ARMv7
  • DietPi-Software | Docker-Compose: removed dependency libffi-dev and libssl-dev for aarch64/arm64. It is not required for building docker-compose
  • DietPi-Software | Python (pip): move pipweels installation on top, to be setup first
  • DietPi-Software | Docker-Compose: change software ID from 187 to 134

DietPi-Software | Docker-Compose: reserve Software ID 187, get ready for further implementation.
@Joulinar Joulinar added this to the v6.35 milestone Dec 29, 2020
@Joulinar Joulinar linked an issue Dec 29, 2020 that may be closed by this pull request
@Joulinar
Copy link
Collaborator Author

Joulinar commented Dec 29, 2020

@MichaIng
should we make Docker Compose depending on Docker? Means, to install Docker along with Compose? I mean it doesn't make much sense without 🤣

@MichaIng
Copy link
Owner

I would say so, similar to how Portainer does.

Joulinar added 2 commits December 29, 2020 18:13
DietPi-Software | Docker-Compose:  Add dependency for Docker and Python (pip)
DietPi-Software | Docker-Compose: add install and removal process
DietPi-Software | Python (pip): enable pipweels as additional pip repository for ARMv6 and ARMv7
@Joulinar
Copy link
Collaborator Author

@MichaIng
for the time being, I added all dependency for G_HW_ARCH 3 aarch64/arm64. On my test with RPi4 64bit, not all of them are needed. Unfortunately I don't have other boards to verify with other devices. Still I'm lacking how to simulate other boards on a VM 🤣

As well I did a first attempt to get pipweels activated for ARMv6 and ARMv7

@MichaIng
Copy link
Owner

Unfortunately I don't have other boards to verify with other devices.

I'll test it on other ARMv8 boards, however, RPi4 64-bit should behave the same as it is the same Debian APT repository.

@Joulinar
Copy link
Collaborator Author

I tested it on RPi4 64bit. There make and gcc are enough. Not sure about NonRPi boards

@ravenclaw900
Copy link
Collaborator

ravenclaw900 commented Dec 30, 2020

Still I'm lacking how to simulate other boards on a VM

QEMU is good at that. It has quite a few ARM and ARM64 emulated boards. DietPi doesn't have any images for any of them (except for the Raspberry Pis), though it does support the OrangePi PC, which is supported.

@Joulinar
Copy link
Collaborator Author

I was trying QEMU in past but never succeeded to get it running on my W10 box

DietPi-Software | Docker-Compose: removed dependency libffi-dev and libssl-dev for aarch64/arm64. It is not required for building docker-compose
@Joulinar
Copy link
Collaborator Author

during the last couple of days, I did some test installation and for me it was working fine. Would be good to have a 2nd pair of eyes checking. Especially on nonRPi boards.

dietpi/dietpi-software Outdated Show resolved Hide resolved
dietpi/dietpi-software Outdated Show resolved Hide resolved
DietPi-Software | Python (pip): move pipweels installation on top, to be setup first
DietPi-Software | Docker-Compose: change software ID from 187 to 134
dietpi/dietpi-software Outdated Show resolved Hide resolved
@MichaIng
Copy link
Owner

Works very well on x86_64, used it to run the Pi-hole Docker container to do some testing there 👍. A quite simple install anyway, thanks to pip. Let me do some minor code changes, otherwise ready to be merged.

@Joulinar
Copy link
Collaborator Author

Joulinar commented Jan 24, 2021

Works very well on x86_64

🤔 well piwheels config file is created for ARMv6 and ARMv7 only 😉
Or do you mean docker-compose?

+ Minor
@MichaIng
Copy link
Owner

Works great on VM and ARMv7. I'll merge.

@MichaIng MichaIng merged commit 94ebce5 into dev Jan 25, 2021
@MichaIng MichaIng deleted the docker-compose branch January 25, 2021 00:43
@Joulinar
Copy link
Collaborator Author

ok I verified it once more on my RPi3B+ and first I was irritated by the output. Was not expecting the word-wrap to see 😄

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Installing Python 3 pip: Python 3 package installer

[      ] DietPi-Software | eval echo -e '[global]
[  OK  ] DietPi-Software | eval echo -e '[global]
extra-index-url=https://www.piwheels.org/simple/' > /etc/pip.conf
[  OK  ] DietPi-Software | Checking URL: https://bootstrap.pypa.io/get-pip.py

but it is working well 👍

@MichaIng
Copy link
Owner

Indeed that looks strange. Also the notification function that aims to replace the execution animation doesn't recognise manual "\n" linebreaks, so the first line is not overprinted as expected.

I just fixed that within G_EXEC: 13a0edf
When the passed command contains any escape sequence (like \n newline), that sequence is part of the executed command, so should be shown in the output like that and not expanded through G_DIETPI-NOTIFY to an actual newline. That is quite easy by escaping all backslash characters with a second backslash.

Only left glitch: In the error prompt, the command will still be shown with an actual newline, as whiptail does not support escaping them at all. Like in console echo -e 'line1\\nline2' can be used to print "\n" literally, but in whiptail this leads to a backslash followed by an actual newline... But I think it's rare and unimportant enough to be ignored 😄.

@Joulinar
Copy link
Collaborator Author

way better now. well done 😃

 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Installing Python 3 pip: Python 3 package installer

[  OK  ] DietPi-Software | eval echo -e '[global]\nextra-index-url=https://www.piwheels.org/simple/' > /etc/pip.conf
[  OK  ] DietPi-Software | Checking URL: https://bootstrap.pypa.io/get-pip.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DietPi-Software | Docker Compose
3 participants