# Ubuntu 20.04 linphone-sdk Docker Image \>\>\> build linphone-desktop and flexisip

**URL:** <https://forum.ficusonline.com/t/topic/430>\
**Category:** Server\
**Created:** [2021 年 10 月 4 日午前 2:35 UTC](https://forum.ficusonline.com/t/topic/430 "2021-10-04T02:35:56Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)\
**Post date:** [2021 年 10 月 18 日午前 11:53 UTC](https://forum.ficusonline.com/t/topic/430/9 "2021-10-18T11:53:43Z")

</div>

## Nginx(Alpine)コンテナでクローンデーモン起動

**certbot** による認証更新をスケジュール管理するため、デフォルトのジョブ **Nginx** にクローンデーモン **crond** によるジョブを追加します。

### Dockerfile

**nginx-alpine**

```auto
FROM nginx:alpine

# Set working directory
WORKDIR /var/www/html

RUN apk add --no-cache bash nano tzdata certbot-nginx \
    && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
    && echo "Asia/Tokyo" > /etc/timezone \
    && apk del tzdata
COPY nginx_default.conf /etc/nginx/conf.d/default.conf
COPY nginx_crond /etc/periodic/monthly
COPY nginx-crond.sh /
RUN chmod a+x /nginx-crond.sh
CMD ["/nginx-crond.sh"]

```

以下シェルスクリプトをクロンジョブのマンスリーディレクトリにコピー。  
**nginx-crond**

```auto
#!/bin/sh
certbot renew
nginx -s reload

```

**コンテナのマルチサービスを実行するスクリプト作成**

> [@Dockerコマンド、Dockerfile・Compose file リファレンス](https://forum.ficusonline.com/t/topic/128/21):
>
> Dockerfile Run multiple services in a container Dockerコンテナ起動時のマルチサービスの実行 dockerfile FROM ubuntu:latest COPY my\_main\_process my\_main\_process COPY my\_helper\_process my\_helper\_process COPY my\_wrapper\_…

**nginx-crond.sh**

```auto
#!/bin/bash

# turn on bash's job control
set -m

# Start the primary process and put it in the background
nginx -g 'daemon off;' &

# Start the helper process
crond

# the my_helper_process might need to know how to wait on the
# primary process to start before it does its work and returns

# now we bring the primary process back into the foreground
# and leave it there
fg %1

```

---

_[View the full topic](https://forum.ficusonline.com/t/topic/430)._
