forked from goodrain/builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (24 loc) · 925 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM rainbond/cedar14:20180416
LABEL MAINTAINER ="zhengys <zhengys@goodrain.com>"
# 时区设置
RUN echo "Asia/Shanghai" > /etc/timezone;dpkg-reconfigure -f noninteractive tzdata
# git ssh 禁止提示添加host key
RUN sed -i "s/# StrictHostKeyChecking ask/StrictHostKeyChecking no/g" /etc/ssh/ssh_config
# 复制ssh key
RUN mkdir /root/.ssh
ADD ./id_rsa /root/.ssh/id_rsa
ADD ./id_rsa.pub /root/.ssh/
RUN chmod 700 /root/.ssh && chmod 600 /root/.ssh/id_rsa
RUN mkdir /app
RUN addgroup --quiet --gid 200 rain && \
useradd rain --uid=200 --gid=200 --home-dir /app --no-create-home
ADD ./builder/ /tmp/builder
RUN /tmp/builder/install-buildpacks
ADD ./pre-compile/ /tmp/pre-compile
ADD ./buildpacks /tmp/buildpacks
RUN chown rain.rain -R /tmp/pre-compile /tmp/builder /tmp/buildpacks
RUN chown -R rain:rain /app
USER rain
ENV HOME /app
ENV RELEASE_DESC=__RELEASE_DESC__
ENTRYPOINT ["/tmp/builder/build.sh"]