On Thu, Oct 29, 2020 at 04:29:46PM +0800, Luan Shengde wrote:
On Thu, Oct 29, 2020 at 03:53:06PM +0800, Wang Chenglong wrote:
[What] The docker file for build a container to provide network time synchronization service for virtual and physical machines.
Signed-off-by: Wang Chenglong 18509160991@163.com
container/ntp-server/Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 container/ntp-server/Dockerfile
diff --git a/container/ntp-server/Dockerfile b/container/ntp-server/Dockerfile new file mode 100644 index 0000000..6d95bf2 --- /dev/null +++ b/container/ntp-server/Dockerfile @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+FROM centos:7
+RUN yum repolist +RUN yum -y install ntp \
- && yum clean all
write as below will be better: RUN yum -y install ntp && \ yum clean all
Ok.
Thanks, Chenglong
Thanks Luan Shengde
+COPY ntp.conf /etc/ntp.conf +COPY start-server.sh /
+EXPOSE 123
+ENTRYPOINT ["/start-server.sh"]
+CMD ["sh"]
2.23.0