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

build folder and ARM64V8 #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## YunoHost Docker image

This repository contains tools to build and run a YunoHost container using Docker.
Image for amd64, i386 and armv7/armhf (ex : run for PC or run for RaspberryPi 2/3/4, not for RaspberryPi A/B).
Image for amd64, i386, armv7/armhf and arm64v8 (ex : run for PC or run for RaspberryPi 2/3/4, not for RaspberryPi A/B).

With this image, you can use YunoHost like a true instance on physical server with more flexibility for system management (quick install, easier upgrade, multiple instances on the same server, can tag/backup/restore state with docker tools ...).

Expand All @@ -11,22 +11,15 @@ With this image, you can use YunoHost like a true instance on physical server wi

### Docker images

#### Supported tags and respective ``Dockerfile`` links

* AMD64
* [``latest``,``4.0.8-2`` (Dockerfile)](https://github.com/domainelibre/YunohostDockerImage/blob/master/Dockerfile_AMD64)
* I386
* [``latest``,``4.0.8-2`` (Dockerfile)](https://github.com/domainelibre/YunohostDockerImage/blob/master/Dockerfile_I386)
* ARMV7
* [``latest``,``4.0.8-2`` (Dockerfile)](https://github.com/domainelibre/YunohostDockerImage/blob/master/Dockerfile_ARMV7)

#### Downloading prebuit image

```
# image amd64
docker pull domainelibre/yunohost
# image i386
docker pull domainelibre/yunohost-i386
# image arm64v8
docker pull cms0/yunohost
# image armv7/armhf
docker pull domainelibre/yunohost-arm
```
Expand Down Expand Up @@ -186,15 +179,15 @@ yunohost backup restore <date backup, ex : 20170430-174149>
docker rm yunohost
```

### Building image
### Building image witgh docker-compose

```
# clone yunohost install script
git clone https://github.com/domainelibre/YunohostDockerImage
git clone https://github.com/christiansteier/YunohostDockerImage
cd YunohostDockerImage

# docker build
docker build -f Dockerfile_<suffix docker file> -t <your image tag>:build .
docker-compose -f docker-compose.<suffix docker file>.yml build
```

---
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions build/Dockerfile_ARM64V8
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM arm64v8/debian:buster

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y systemd && \
apt-get clean

ADD preinstall.sh /tmp/preinstall.sh
RUN chmod +x /tmp/preinstall.sh && \
/tmp/./preinstall.sh && \
rm /tmp/preinstall.sh && \
apt-get clean && \
apt-get autoclean

ADD hack_scripts/hostfiles-hack.sh /usr/local/bin/
ADD hack_scripts/hostfiles-hack.service /etc/systemd/system/
RUN chmod 664 /etc/systemd/system/hostfiles-hack.service && \
chmod 744 /usr/local/bin/hostfiles-hack.sh && \
systemctl enable hostfiles-hack.service && \
rm -rf \
/etc/machine-id \
/var/lib/dbus/machine-id \
/var/lib/apt/lists/* \
/var/log/alternatives.log \
/var/log/apt/history.log \
/var/log/apt/term.log \
/var/log/dpkg.log \
/var/cache/ldconfig/aux-cache \
/usr/share/doc \
/usr/share/man/ \
/usr/share/info/* \
/var/cache/man/* \
/tmp/*

CMD ["/bin/systemd"]
STOPSIGNAL SIGRTMIN+3
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions docker-compose.AMD64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '2'
services:
yunohost:
image: 'domainelibre/yunohost'
build:
context: ./build
dockerfile: Dockerfile_AMD64
privileged: true
restart: always
container_name: yunohost
hostname: yunohost.DOMAIN
ports:
- '2022:22'
- '25:25'
- '80:80'
- '443:443'
- '465:465'
- '587:587'
- '993:993'
- '5222:5222'
- '5269:5269'
command: ["/bin/systemd"]
volumes:
- '/srv/yuno/backup:/home/yunohost.backup/archives'
- '/media:/media'
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
- '/var/run/docker.sock:/var/run/docker.sock'
27 changes: 27 additions & 0 deletions docker-compose.ARM64V8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '2'
services:
yunohost:
image: 'cms0/yunohost'
build:
context: ./build
dockerfile: Dockerfile_ARM64V8
privileged: true
restart: always
container_name: yunohost
hostname: yunohost.DOMAIN
ports:
- '2022:22'
- '25:25'
- '80:80'
- '443:443'
- '465:465'
- '587:587'
- '993:993'
- '5222:5222'
- '5269:5269'
command: ["/bin/systemd"]
volumes:
- '/srv/yuno/backup:/home/yunohost.backup/archives'
- '/media:/media'
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
- '/var/run/docker.sock:/var/run/docker.sock'
27 changes: 27 additions & 0 deletions docker-compose.ARMV7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '2'
services:
yunohost:
image: 'domainelibre/yunohost'
build:
context: ./build
dockerfile: Dockerfile_ARMV7
privileged: true
restart: always
container_name: yunohost
hostname: yunohost.DOMAIN
ports:
- '2022:22'
- '25:25'
- '80:80'
- '443:443'
- '465:465'
- '587:587'
- '993:993'
- '5222:5222'
- '5269:5269'
command: ["/bin/systemd"]
volumes:
- '/srv/yuno/backup:/home/yunohost.backup/archives'
- '/media:/media'
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
- '/var/run/docker.sock:/var/run/docker.sock'
3 changes: 3 additions & 0 deletions docker-compose.yml → docker-compose.I386.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ version: '2'
services:
yunohost:
image: 'domainelibre/yunohost'
build:
context: ./build
dockerfile: Dockerfile_I386
privileged: true
restart: always
container_name: yunohost
Expand Down