##// END OF EJS Templates
feat(deps): bumped SVN to 1.14.3
super-admin -
Show More
@@ -1,480 +1,481 b''
1 # virtualenv-install for 5.X
1 # virtualenv-install for 5.X
2
2
3 FROM ubuntu:22.04
3 FROM ubuntu:22.04
4 # Using 22.04 LTS Release
4 # Using 22.04 LTS Release
5
5
6 ARG TZ="UTC"
6 ARG TZ="UTC"
7 ARG LOCALE_TYPE=en_US.UTF-8
7 ARG LOCALE_TYPE=en_US.UTF-8
8 ARG RHODECODE_TYPE=Enterprise
8 ARG RHODECODE_TYPE=Enterprise
9
9
10 ARG RHODECODE_DB=sqlite
10 ARG RHODECODE_DB=sqlite
11 ARG RHODECODE_USER_NAME=admin
11 ARG RHODECODE_USER_NAME=admin
12 ARG RHODECODE_USER_PASS=secret4
12 ARG RHODECODE_USER_PASS=secret4
13 ARG RHODECODE_USER_EMAIL=admin@server.local
13 ARG RHODECODE_USER_EMAIL=admin@server.local
14
14
15 # env are runtime
15 # env are runtime
16 ENV \
16 ENV \
17 TZ=${TZ} \
17 TZ=${TZ} \
18 LOCALE_TYPE=${LOCALE_TYPE} \
18 LOCALE_TYPE=${LOCALE_TYPE} \
19 \
19 \
20 ## Define type we build, and the instance we'll create
20 ## Define type we build, and the instance we'll create
21 RHODECODE_TYPE=${RHODECODE_TYPE} \
21 RHODECODE_TYPE=${RHODECODE_TYPE} \
22 RC_TYPE_ID=enterprise-1 \
22 RC_TYPE_ID=enterprise-1 \
23 \
23 \
24 ## set DB, default sqlite
24 ## set DB, default sqlite
25 RHODECODE_DB=${RHODECODE_DB} \
25 RHODECODE_DB=${RHODECODE_DB} \
26 \
26 \
27 ## set app bootstrap required data
27 ## set app bootstrap required data
28 RHODECODE_USER_NAME=${RHODECODE_USER_NAME} \
28 RHODECODE_USER_NAME=${RHODECODE_USER_NAME} \
29 RHODECODE_USER_PASS=${RHODECODE_USER_PASS} \
29 RHODECODE_USER_PASS=${RHODECODE_USER_PASS} \
30 RHODECODE_USER_EMAIL=${RHODECODE_USER_EMAIL} \
30 RHODECODE_USER_EMAIL=${RHODECODE_USER_EMAIL} \
31 \
31 \
32 RC_USER=rhodecode \
32 RC_USER=rhodecode \
33 \
33 \
34 # SVN CONFIG
34 # SVN CONFIG
35 MOD_DAV_SVN_CONF_FILE=/etc/rhodecode/conf/svn/mod_dav_svn.conf \
35 MOD_DAV_SVN_CONF_FILE=/etc/rhodecode/conf/svn/mod_dav_svn.conf \
36 MOD_DAV_SVN_PORT=8090 \
36 MOD_DAV_SVN_PORT=8090 \
37 MOD_DAV_SVN_LOG_LEVEL=info \
37 MOD_DAV_SVN_LOG_LEVEL=info \
38 MOD_DAV_CORE_MODULES_DIR=/home/rhodecode/apache2/modules \
38 MOD_DAV_CORE_MODULES_DIR=/home/rhodecode/apache2/modules \
39 MOD_DAV_SVN_MODULE=/home/rhodecode/subversion/libexec/mod_dav_svn.so \
39 MOD_DAV_SVN_MODULE=/home/rhodecode/subversion/libexec/mod_dav_svn.so \
40 \
40 \
41 # SSHD CONFIG
41 # SSHD CONFIG
42 SSHD_CONF_FILE=/etc/rhodecode/sshd_config \
42 SSHD_CONF_FILE=/etc/rhodecode/sshd_config \
43 \
43 \
44 SHARED_CONF_DIR=/etc/rhodecode/conf \
44 SHARED_CONF_DIR=/etc/rhodecode/conf \
45 BUILD_CONF=/etc/rhodecode/conf_build \
45 BUILD_CONF=/etc/rhodecode/conf_build \
46 BUILD_BIN_DIR=/usr/local/bin/rhodecode_bin \
46 BUILD_BIN_DIR=/usr/local/bin/rhodecode_bin \
47 RHODECODE_STATIC_DIR=/var/opt/rhodecode_static \
47 RHODECODE_STATIC_DIR=/var/opt/rhodecode_static \
48 RHODECODE_DATA_DIR=/var/opt/rhodecode_data \
48 RHODECODE_DATA_DIR=/var/opt/rhodecode_data \
49 RHODECODE_REPO_DIR=/var/opt/rhodecode_repo_store \
49 RHODECODE_REPO_DIR=/var/opt/rhodecode_repo_store \
50 RHODECODE_HTTP_PORT=10020 \
50 RHODECODE_HTTP_PORT=10020 \
51 RHODECODE_VCS_PORT=10010 \
51 RHODECODE_VCS_PORT=10010 \
52 RHODECODE_HOST=0.0.0.0 \
52 RHODECODE_HOST=0.0.0.0 \
53 RHODECODE_VCS_HOST=127.0.0.1
53 RHODECODE_VCS_HOST=127.0.0.1
54
54
55
55
56 ENV SSH_DEPS \
56 ENV SSH_DEPS \
57 openssh-server
57 openssh-server
58
58
59 ENV SVN_DEPS \
59 ENV SVN_DEPS \
60 ""
60 ""
61
61
62 ENV SVN_DEV_DEPS \
62 ENV SVN_DEV_DEPS \
63 libtool automake autoconf libapr1-dev libaprutil1-dev libdb5.3-dev liblz4-dev libpcre3-dev \
63 libtool automake autoconf libapr1-dev libaprutil1-dev libdb5.3-dev liblz4-dev libpcre3-dev \
64 libperl-dev libserf-dev libneon27-gnutls-dev libutf8proc-dev py3c-dev gettext tcl-dev
64 libperl-dev libserf-dev libneon27-gnutls-dev libutf8proc-dev py3c-dev gettext tcl-dev
65
65
66 ENV PYTHON_DEPS \
66 ENV PYTHON_DEPS \
67 python3.11
67 python3.11
68 ENV PYTHON_DEV_DEPS \
68 ENV PYTHON_DEV_DEPS \
69 python3.11-dev build-essential libpq-dev libmysqlclient-dev libxmlsec1-dev libxml2-dev libsqlite3-dev \
69 python3.11-dev build-essential libpq-dev libmysqlclient-dev libxmlsec1-dev libxml2-dev libsqlite3-dev \
70 liblzma-dev libzmq3-dev libldap2-dev libsasl2-dev libcurl4-openssl-dev libssl-dev libxslt-dev
70 liblzma-dev libzmq3-dev libldap2-dev libsasl2-dev libcurl4-openssl-dev libssl-dev libxslt-dev
71
71
72 ENV EXTRA_DEPS \
72 ENV EXTRA_DEPS \
73 vim rsync pkg-config openssl libbz2-1.0 libbz2-dev sqlite3 cpanminus libapr1
73 vim rsync pkg-config openssl libbz2-1.0 libbz2-dev sqlite3 cpanminus libapr1
74
74
75 # define which deps from the above should be removed in cleanup phase
75 # define which deps from the above should be removed in cleanup phase
76 ENV CLEANUP_DEPS \
76 ENV CLEANUP_DEPS \
77 $PYTHON_DEV_DEPS $SVN_DEV_DEPS
77 $PYTHON_DEV_DEPS $SVN_DEV_DEPS
78 ENV CLEANUP_DEPS ""
78 ENV CLEANUP_DEPS ""
79
79
80 # https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
80 # https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
81 RUN \
81 RUN \
82 echo "** install base packages && python 3.11.9 **" && \
82 echo "** install base packages && python 3.11.9 **" && \
83 set -eux; \
83 set -eux; \
84 apt-get update; \
84 apt-get update; \
85 apt-get install -y ca-certificates curl openssl gpg; \
85 apt-get install -y ca-certificates curl openssl gpg; \
86 curl -fsSL https://keyserver.ubuntu.com/pks/lookup\?op\=get\&search\=0xba6932366a755776 | gpg --dearmor -o /usr/share/keyrings/python-3.gpg; \
86 curl -fsSL https://keyserver.ubuntu.com/pks/lookup\?op\=get\&search\=0xba6932366a755776 | gpg --dearmor -o /usr/share/keyrings/python-3.gpg; \
87 echo "deb [signed-by=/usr/share/keyrings/python-3.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list; \
87 echo "deb [signed-by=/usr/share/keyrings/python-3.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list; \
88 echo "deb-src [signed-by=/usr/share/keyrings/python-3.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list; \
88 echo "deb-src [signed-by=/usr/share/keyrings/python-3.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list; \
89 \
89 \
90 savedAptMark="$(apt-mark showmanual)"; \
90 savedAptMark="$(apt-mark showmanual)"; \
91 apt-get update; \
91 apt-get update; \
92 DEBIAN_FRONTEND="noninteractive" \
92 DEBIAN_FRONTEND="noninteractive" \
93 apt-get install -y --no-install-recommends \
93 apt-get install -y --no-install-recommends \
94 tini \
94 tini \
95 bash \
95 bash \
96 binutils \
96 binutils \
97 tzdata \
97 tzdata \
98 locales \
98 locales \
99 openssl \
99 openssl \
100 curl \
100 curl \
101 sudo \
101 sudo \
102 gosu \
102 gosu \
103 bzip2 unzip \
103 bzip2 unzip \
104 $PYTHON_DEPS $PYTHON_DEV_DEPS\
104 $PYTHON_DEPS $PYTHON_DEV_DEPS\
105 $SSH_DEPS \
105 $SSH_DEPS \
106 $SVN_DEPS $SVN_DEV_DEPS\
106 $SVN_DEPS $SVN_DEV_DEPS\
107 $EXTRA_DEPS \
107 $EXTRA_DEPS \
108 ; \
108 ; \
109 rm -rf /var/lib/apt/lists/*;
109 rm -rf /var/lib/apt/lists/*;
110
110
111 RUN \
111 RUN \
112 echo "** Configure the locales **" && \
112 echo "** Configure the locales **" && \
113 sed -i "s/^# ${LOCALE_TYPE}/${LOCALE_TYPE}/g" /etc/locale.gen && \
113 sed -i "s/^# ${LOCALE_TYPE}/${LOCALE_TYPE}/g" /etc/locale.gen && \
114 locale-gen
114 locale-gen
115
115
116 # locale-archive is a fix for old nix glibc2.26 locales available
116 # locale-archive is a fix for old nix glibc2.26 locales available
117 ENV \
117 ENV \
118 #LOCALE_ARCHIVE=/var/opt/locale-archive \
118 #LOCALE_ARCHIVE=/var/opt/locale-archive \
119 LANG=${LOCALE_TYPE} \
119 LANG=${LOCALE_TYPE} \
120 LANGUAGE=${LOCALE_TYPE} \
120 LANGUAGE=${LOCALE_TYPE} \
121 LC_ALL=${LOCALE_TYPE}
121 LC_ALL=${LOCALE_TYPE}
122
122
123 # configure the system user
123 # configure the system user
124 # explicitly set uid/gid to guarantee that it won't change in the future
124 # explicitly set uid/gid to guarantee that it won't change in the future
125 # the values 999:999 are identical to the current user/group id assigned
125 # the values 999:999 are identical to the current user/group id assigned
126 RUN \
126 RUN \
127 echo "** Create system user $RC_USER **" && \
127 echo "** Create system user $RC_USER **" && \
128 groupadd --system --gid 999 $RC_USER && \
128 groupadd --system --gid 999 $RC_USER && \
129 useradd --system --gid $RC_USER --uid 999 --shell /bin/bash $RC_USER && \
129 useradd --system --gid $RC_USER --uid 999 --shell /bin/bash $RC_USER && \
130 usermod -G $RC_USER $RC_USER
130 usermod -G $RC_USER $RC_USER
131
131
132 # Add new user docker to sudo group
132 # Add new user docker to sudo group
133 RUN \
133 RUN \
134 adduser $RC_USER sudo
134 adduser $RC_USER sudo
135
135
136 # Ensure sudo group users are not
136 # Ensure sudo group users are not
137 # asked for a password when using
137 # asked for a password when using
138 # sudo command by ammending sudoers file
138 # sudo command by ammending sudoers file
139 RUN \
139 RUN \
140 echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
140 echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
141
141
142 # set the defult bash shell
142 # set the defult bash shell
143 SHELL ["/bin/bash", "-c"]
143 SHELL ["/bin/bash", "-c"]
144
144
145 # Fix and set a timezone
145 # Fix and set a timezone
146 RUN \
146 RUN \
147 echo "** configure the timezone **" && \
147 echo "** configure the timezone **" && \
148 rm /etc/localtime && cp /usr/share/zoneinfo/$TZ /etc/localtime && \
148 rm /etc/localtime && cp /usr/share/zoneinfo/$TZ /etc/localtime && \
149 echo $TZ > /etc/timezone
149 echo $TZ > /etc/timezone
150
150
151
151
152 RUN \
152 RUN \
153 echo "** prepare rhodecode store and cache **" && \
153 echo "** prepare rhodecode store and cache **" && \
154 install -d -m 0755 -o $RC_USER -g $RC_USER /opt/rhodecode && \
154 install -d -m 0755 -o $RC_USER -g $RC_USER /opt/rhodecode && \
155 install -d -m 0755 -o $RC_USER -g $RC_USER /usr/local/bin/rhodecode_bin && \
155 install -d -m 0755 -o $RC_USER -g $RC_USER /usr/local/bin/rhodecode_bin && \
156 install -d -m 0755 -o $RC_USER -g $RC_USER $RHODECODE_STATIC_DIR && \
156 install -d -m 0755 -o $RC_USER -g $RC_USER $RHODECODE_STATIC_DIR && \
157 install -d -m 0755 -o $RC_USER -g $RC_USER $RHODECODE_REPO_DIR && \
157 install -d -m 0755 -o $RC_USER -g $RC_USER $RHODECODE_REPO_DIR && \
158 install -d -m 0755 -o $RC_USER -g $RC_USER $RHODECODE_DATA_DIR && \
158 install -d -m 0755 -o $RC_USER -g $RC_USER $RHODECODE_DATA_DIR && \
159 install -d -m 0755 -o $RC_USER -g $RC_USER $BUILD_CONF && \
159 install -d -m 0755 -o $RC_USER -g $RC_USER $BUILD_CONF && \
160 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/ && \
160 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/ && \
161 install -m 0755 -o $RC_USER -g $RC_USER /dev/null /home/$RC_USER/.rhoderc && \
161 install -m 0755 -o $RC_USER -g $RC_USER /dev/null /home/$RC_USER/.rhoderc && \
162 install -d -m 0700 -o $RC_USER -g $RC_USER /home/$RC_USER/venv && \
162 install -d -m 0700 -o $RC_USER -g $RC_USER /home/$RC_USER/venv && \
163 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/rhodecode-vcsserver && \
163 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/rhodecode-vcsserver && \
164 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/rhodecode-enterprise-ce && \
164 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/rhodecode-enterprise-ce && \
165 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/rhodecode-enterprise-ee && \
165 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/rhodecode-enterprise-ee && \
166 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/.rccontrol && \
166 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/.rccontrol && \
167 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/.rccontrol/cache && \
167 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/.rccontrol/cache && \
168 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/.rccontrol/bootstrap && \
168 install -d -m 0755 -o $RC_USER -g $RC_USER /home/$RC_USER/.rccontrol/bootstrap && \
169 install -d -m 0700 -o $RC_USER -g $RC_USER /home/$RC_USER/.ssh
169 install -d -m 0700 -o $RC_USER -g $RC_USER /home/$RC_USER/.ssh
170
170
171 # expose our custom sshd config
171 # expose our custom sshd config
172 COPY service/sshd/sshd_config $SSHD_CONF_FILE
172 COPY service/sshd/sshd_config $SSHD_CONF_FILE
173
173
174 # change to non-root user for RUN commands
174 # change to non-root user for RUN commands
175 USER $RC_USER
175 USER $RC_USER
176 WORKDIR /home/$RC_USER
176 WORKDIR /home/$RC_USER
177
177
178 ENV \
178 ENV \
179 VENV_PATH=/home/$RC_USER/venv
179 VENV_PATH=/home/$RC_USER/venv
180
180
181 ENV \
181 ENV \
182 PYTHON_VERSION=python3.11 \
182 PYTHON_VERSION=python3.11 \
183 PYTHON_EXECUTABLE=/usr/bin/python3.11 \
183 PYTHON_EXECUTABLE=/usr/bin/python3.11 \
184 PYTHON=$VENV_PATH/bin/python3.11 \
184 PYTHON=$VENV_PATH/bin/python3.11 \
185 PIP_EXECUTABLE=$VENV_PATH/bin/pip \
185 PIP_EXECUTABLE=$VENV_PATH/bin/pip \
186 # make venv application scripts visible
186 # make venv application scripts visible
187 PATH=$VENV_PATH/bin:/home/$RC_USER/.local/bin:$PATH
187 PATH=$VENV_PATH/bin:/home/$RC_USER/.local/bin:$PATH
188
188
189 # check new versions here: https://pypi.org/project/pip/
189 # check new versions here: https://pypi.org/project/pip/
190 RUN \
190 RUN \
191 echo "** get pip **" && \
191 echo "** get pip **" && \
192 curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
192 curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
193 $PYTHON_EXECUTABLE get-pip.py \
193 $PYTHON_EXECUTABLE get-pip.py \
194 --disable-pip-version-check \
194 --disable-pip-version-check \
195 --no-cache-dir \
195 --no-cache-dir \
196 --no-compile \
196 --no-compile \
197 "pip==24.0" && \
197 "pip==24.0" && \
198 rm get-pip.py
198 rm get-pip.py
199
199
200 RUN \
200 RUN \
201 /home/$RC_USER/.local/bin/pip install --user virtualenv
201 /home/$RC_USER/.local/bin/pip install --user virtualenv
202
202
203 RUN \
203 RUN \
204 /home/$RC_USER/.local/bin/virtualenv --python="$PYTHON_EXECUTABLE" $VENV_PATH && \
204 /home/$RC_USER/.local/bin/virtualenv --python="$PYTHON_EXECUTABLE" $VENV_PATH && \
205 /home/$RC_USER/.local/bin/pip install --upgrade pip
205 /home/$RC_USER/.local/bin/pip install --upgrade pip
206
206
207 # swig install
207 # swig install
208 ENV \
208 ENV \
209 RC_SWIG_VERSION=3.0.12 \
209 RC_SWIG_VERSION=3.0.12 \
210 PATH=/usr/local/bin/:$PATH
210 PATH=/usr/local/bin/:$PATH
211
211
212 RUN \
212 RUN \
213 echo "** install swig packages $RC_SWIG_VERSION **" && \
213 echo "** install swig packages $RC_SWIG_VERSION **" && \
214 curl -L https://sourceforge.net/projects/swig/files/swig/swig-$RC_SWIG_VERSION/swig-$RC_SWIG_VERSION.tar.gz/download -o swig.tar.gz && \
214 curl -L https://sourceforge.net/projects/swig/files/swig/swig-$RC_SWIG_VERSION/swig-$RC_SWIG_VERSION.tar.gz/download -o swig.tar.gz && \
215 tar xfz swig.tar.gz && rm swig.tar.gz && \
215 tar xfz swig.tar.gz && rm swig.tar.gz && \
216 cd swig-$RC_SWIG_VERSION && \
216 cd swig-$RC_SWIG_VERSION && \
217 ./configure --with-python=$PYTHON && \
217 ./configure --with-python=$PYTHON && \
218 make && \
218 make && \
219 sudo make install && \
219 sudo make install && \
220 cd ../ && sudo rm -rf swig-$RC_SWIG_VERSION
220 cd ../ && sudo rm -rf swig-$RC_SWIG_VERSION
221
221
222 # GIT Install
222 # GIT Install
223 ENV \
223 ENV \
224 RC_GIT_VER=2.44.0 \
224 RC_GIT_VER=2.44.0 \
225 # make git scripts visible
225 # make git scripts visible
226 PATH=/home/$RC_USER/git/bin:$PATH
226 PATH=/home/$RC_USER/git/bin:$PATH
227
227
228 RUN \
228 RUN \
229 echo "** install git packages $RC_GIT_VER **" && \
229 echo "** install git packages $RC_GIT_VER **" && \
230 curl -L https://www.kernel.org/pub/software/scm/git/git-$RC_GIT_VER.tar.gz -o git.tar.gz && \
230 curl -L https://www.kernel.org/pub/software/scm/git/git-$RC_GIT_VER.tar.gz -o git.tar.gz && \
231 tar xfz git.tar.gz && rm git.tar.gz && \
231 tar xfz git.tar.gz && rm git.tar.gz && \
232 cd git-$RC_GIT_VER && \
232 cd git-$RC_GIT_VER && \
233 ./configure --prefix=/home/$RC_USER/git && \
233 ./configure --prefix=/home/$RC_USER/git && \
234 make NO_GETTEXT=yes NO_MSGFMT=yes && \
234 make NO_GETTEXT=yes NO_MSGFMT=yes && \
235 sudo make install && \
235 sudo make install && \
236 cd ../ && sudo rm -rf git-$RC_GIT_VER
236 cd ../ && sudo rm -rf git-$RC_GIT_VER
237
237
238 RUN \
238 RUN \
239 echo "** install git symlinks **" && \
239 echo "** install git symlinks **" && \
240 mkdir -p $BUILD_BIN_DIR/vcs_bin && \
240 mkdir -p $BUILD_BIN_DIR/vcs_bin && \
241 sudo chown $RC_USER:$RC_USER /home/$RC_USER/git && \
241 sudo chown $RC_USER:$RC_USER /home/$RC_USER/git && \
242 ln -s /home/$RC_USER/git/bin/* $BUILD_BIN_DIR/vcs_bin/
242 ln -s /home/$RC_USER/git/bin/* $BUILD_BIN_DIR/vcs_bin/
243
243
244 # GIT LFS install
244 # GIT LFS install
245 # https://github.com/git-lfs/git-lfs/releases
245 # https://github.com/git-lfs/git-lfs/releases
246 ENV \
246 ENV \
247 RC_GIT_LFS_VER=3.4.1 \
247 RC_GIT_LFS_VER=3.4.1 \
248 PATH=/home/$RC_USER/git-lfs/bin:$PATH
248 PATH=/home/$RC_USER/git-lfs/bin:$PATH
249
249
250 RUN \
250 RUN \
251 echo "** install git LFS packages $RC_GIT_LFS_VER **" && \
251 echo "** install git LFS packages $RC_GIT_LFS_VER **" && \
252 curl -L https://github.com/git-lfs/git-lfs/releases/download/v$RC_GIT_LFS_VER/git-lfs-linux-amd64-v$RC_GIT_LFS_VER.tar.gz -o git_lfs.tar.gz && \
252 curl -L https://github.com/git-lfs/git-lfs/releases/download/v$RC_GIT_LFS_VER/git-lfs-linux-amd64-v$RC_GIT_LFS_VER.tar.gz -o git_lfs.tar.gz && \
253 tar xfz git_lfs.tar.gz && rm git_lfs.tar.gz && \
253 tar xfz git_lfs.tar.gz && rm git_lfs.tar.gz && \
254 mv git-lfs-$RC_GIT_LFS_VER git-lfs && \
254 mv git-lfs-$RC_GIT_LFS_VER git-lfs && \
255 rm -rf git-lfs/man && \
255 rm -rf git-lfs/man && \
256 cd git-lfs && \
256 cd git-lfs && \
257 sudo PREFIX=/home/$RC_USER/git ./install.sh && \
257 sudo PREFIX=/home/$RC_USER/git ./install.sh && \
258 rm install.sh README.md CHANGELOG.md
258 rm install.sh README.md CHANGELOG.md
259
259
260 RUN \
260 RUN \
261 echo "** install git-lfs symlinks **" && \
261 echo "** install git-lfs symlinks **" && \
262 mkdir -p $BUILD_BIN_DIR/vcs_bin && \
262 mkdir -p $BUILD_BIN_DIR/vcs_bin && \
263 sudo chown $RC_USER:$RC_USER /home/$RC_USER/git-lfs && \
263 sudo chown $RC_USER:$RC_USER /home/$RC_USER/git-lfs && \
264 ln -s /home/$RC_USER/git-lfs/* $BUILD_BIN_DIR/vcs_bin/
264 ln -s /home/$RC_USER/git-lfs/* $BUILD_BIN_DIR/vcs_bin/
265
265
266 # Apache2 install, check here for new versions: https://httpd.apache.org/
266 # Apache2 install, check here for new versions: https://httpd.apache.org/
267 ENV \
267 ENV \
268 RC_APACHE2_VER=2.4.59 \
268 RC_APACHE2_VER=2.4.59 \
269 # make apache scripts visible
269 # make apache scripts visible
270 PATH=/home/$RC_USER/apache2/bin:$PATH
270 PATH=/home/$RC_USER/apache2/bin:$PATH
271
271
272 RUN \
272 RUN \
273 echo "** install Apache packages $RC_SVN_VER **" && \
273 echo "** install Apache packages $RC_SVN_VER **" && \
274 curl -L https://archive.apache.org/dist/httpd/httpd-$RC_APACHE2_VER.tar.gz -o apache2.tar.gz && \
274 curl -L https://archive.apache.org/dist/httpd/httpd-$RC_APACHE2_VER.tar.gz -o apache2.tar.gz && \
275 tar xfz apache2.tar.gz && rm apache2.tar.gz && \
275 tar xfz apache2.tar.gz && rm apache2.tar.gz && \
276 cd httpd-$RC_APACHE2_VER && \
276 cd httpd-$RC_APACHE2_VER && \
277 ./configure --prefix=/home/$RC_USER/apache2 --enable-mods-shared=reallyall --enable-dav --enable-authn-anon && \
277 ./configure --prefix=/home/$RC_USER/apache2 --enable-mods-shared=reallyall --enable-dav --enable-authn-anon && \
278 make && \
278 make && \
279 make install && \
279 make install && \
280 cd ../ && sudo rm -rf httpd-$RC_APACHE2_VER
280 cd ../ && sudo rm -rf httpd-$RC_APACHE2_VER
281
281
282 # custom SVN virtualhost
282 # custom SVN virtualhost
283 COPY \
283 COPY \
284 service/svn/virtualhost.conf /home/$RC_USER/apache2/conf/virtualhost.conf
284 service/svn/virtualhost.conf /home/$RC_USER/apache2/conf/virtualhost.conf
285
285
286 RUN \
286 RUN \
287 echo "**** Apache config ****" && \
287 echo "**** Apache config ****" && \
288 rm -rf /home/$RC_USER/apache2/htdocs && \
288 rm -rf /home/$RC_USER/apache2/htdocs && \
289 rm -rf /home/$RC_USER/apache2/icons && \
289 rm -rf /home/$RC_USER/apache2/icons && \
290 rm -rf /home/$RC_USER/apache2/manual && \
290 rm -rf /home/$RC_USER/apache2/manual && \
291 rm -rf /home/$RC_USER/apache2/man && \
291 rm -rf /home/$RC_USER/apache2/man && \
292 sed -i "s/DocumentRoot/#DocumentRoot/g" /home/$RC_USER/apache2/conf/httpd.conf && \
292 sed -i "s/DocumentRoot/#DocumentRoot/g" /home/$RC_USER/apache2/conf/httpd.conf && \
293 sed -i "s/Listen 80/Listen ${MOD_DAV_SVN_PORT}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
293 sed -i "s/Listen 80/Listen ${MOD_DAV_SVN_PORT}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
294 sed -i "s/#LoadModule dav_module modules\/mod_dav.so/LoadModule dav_module modules\/mod_dav.so/g" /home/$RC_USER/apache2/conf/httpd.conf && \
294 sed -i "s/#LoadModule dav_module modules\/mod_dav.so/LoadModule dav_module modules\/mod_dav.so/g" /home/$RC_USER/apache2/conf/httpd.conf && \
295 sed -i "s/User daemon/User ${RC_USER}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
295 sed -i "s/User daemon/User ${RC_USER}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
296 sed -i "s/Group daemon/Group ${RC_USER}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
296 sed -i "s/Group daemon/Group ${RC_USER}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
297 sed -i "s/ServerAdmin you@example.com/ServerAdmin admin@${HOSTNAME}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
297 sed -i "s/ServerAdmin you@example.com/ServerAdmin admin@${HOSTNAME}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
298 sed -i "s/ServerName buildkitsandbox/ServerName ${HOSTNAME}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
298 sed -i "s/ServerName buildkitsandbox/ServerName ${HOSTNAME}/g" /home/$RC_USER/apache2/conf/httpd.conf && \
299 sed -i "s/#Include conf\/extra\/httpd-vhosts.conf/Include conf\/virtualhost.conf/g" /home/$RC_USER/apache2/conf/httpd.conf
299 sed -i "s/#Include conf\/extra\/httpd-vhosts.conf/Include conf\/virtualhost.conf/g" /home/$RC_USER/apache2/conf/httpd.conf
300
300
301
301
302 # Subversion install
302 # Subversion install
303 # https://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/INSTALL
303 # https://svn.apache.org/repos/asf/subversion/trunk/subversion/bindings/swig/INSTALL
304 # new versions: https://subversion.apache.org/download.cgi
304 # new versions: https://subversion.apache.org/download.cgi
305 # https://downloads.apache.org/subversion
305 # https://downloads.apache.org/subversion
306 # https://svn.apache.org/repos/asf/subversion/trunk/CHANGES
306
307
307 ENV \
308 ENV \
308 RC_SVN_VER=1.14.2 \
309 RC_SVN_VER=1.14.3 \
309 SVN_PREFIX=/home/$RC_USER/subversion \
310 SVN_PREFIX=/home/$RC_USER/subversion \
310 # make svn scripts visible
311 # make svn scripts visible
311 PATH=/home/$RC_USER/subversion/bin:$PATH
312 PATH=/home/$RC_USER/subversion/bin:$PATH
312
313
313
314
314 RUN \
315 RUN \
315 echo "** install svn packages $RC_SVN_VER **" && \
316 echo "** install svn packages $RC_SVN_VER **" && \
316 curl -L https://downloads.apache.org/subversion/subversion-$RC_SVN_VER.tar.gz -o subversion.tar.gz && \
317 curl -L https://downloads.apache.org/subversion/subversion-$RC_SVN_VER.tar.gz -o subversion.tar.gz && \
317 tar xfz subversion.tar.gz && rm subversion.tar.gz && \
318 tar xfz subversion.tar.gz && rm subversion.tar.gz && \
318 cd subversion-$RC_SVN_VER && \
319 cd subversion-$RC_SVN_VER && \
319 ./autogen.sh && \
320 ./autogen.sh && \
320 ./configure --prefix=$SVN_PREFIX --with-apxs=/home/$RC_USER/apache2/bin/apxs --enable-mod-activation --with-swig=/usr/local/bin/swig && \
321 ./configure --prefix=$SVN_PREFIX --with-apxs=/home/$RC_USER/apache2/bin/apxs --enable-mod-activation --with-swig=/usr/local/bin/swig && \
321 make && \
322 make && \
322 sudo make install && \
323 sudo make install && \
323 sudo make clean-swig-py && \
324 sudo make clean-swig-py && \
324 sudo make swig-py swig_pydir=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/libsvn swig_pydir_extra=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/svn && \
325 sudo make swig-py swig_pydir=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/libsvn swig_pydir_extra=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/svn && \
325 sudo make install-swig-py swig_pydir=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/libsvn swig_pydir_extra=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/svn && \
326 sudo make install-swig-py swig_pydir=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/libsvn swig_pydir_extra=$VENV_PATH/lib/$PYTHON_VERSION/site-packages/svn && \
326 sudo ldconfig -v && \
327 sudo ldconfig -v && \
327 cd ../ && sudo rm -rf subversion-$RC_SVN_VER
328 cd ../ && sudo rm -rf subversion-$RC_SVN_VER
328
329
329 RUN \
330 RUN \
330 echo "** install svn symlinks **" && \
331 echo "** install svn symlinks **" && \
331 mkdir -p $BUILD_BIN_DIR/vcs_bin && \
332 mkdir -p $BUILD_BIN_DIR/vcs_bin && \
332 sudo chown $RC_USER:$RC_USER /home/$RC_USER/subversion && \
333 sudo chown $RC_USER:$RC_USER /home/$RC_USER/subversion && \
333 echo $(strings $MOD_DAV_SVN_MODULE | grep 'Powered by') > $BUILD_BIN_DIR/vcs_bin/mod_dav_svn.version && \
334 echo $(strings $MOD_DAV_SVN_MODULE | grep 'Powered by') > $BUILD_BIN_DIR/vcs_bin/mod_dav_svn.version && \
334 ln -s /home/$RC_USER/subversion/bin/* $BUILD_BIN_DIR/vcs_bin/
335 ln -s /home/$RC_USER/subversion/bin/* $BUILD_BIN_DIR/vcs_bin/
335
336
336 #TODO: compile libgit2
337 #TODO: compile libgit2
337 #https://www.pygit2.org/install.html#advanced
338 #https://www.pygit2.org/install.html#advanced
338 #ENV \
339 #ENV \
339 # RC_LIBGIT2_VER=1.14.2 \
340 # RC_LIBGIT2_VER=1.14.2 \
340 # curl -L https://github.com/libgit2/libgit2/archive/refs/tags/v$RC_LIBGIT2_VER.tar.gz -o libgit2.tar.gz
341 # curl -L https://github.com/libgit2/libgit2/archive/refs/tags/v$RC_LIBGIT2_VER.tar.gz -o libgit2.tar.gz
341 # tar xzf libgit2.tar.gz && rm libgit2.tar.gz
342 # tar xzf libgit2.tar.gz && rm libgit2.tar.gz
342 # cd libgit2-$RC_LIBGIT2_VER/
343 # cd libgit2-$RC_LIBGIT2_VER/
343 # cmake .
344 # cmake .
344 # make
345 # make
345 # sudo make install \
346 # sudo make install \
346 #
347 #
347
348
348 ARG RHODECODE_VERSION=5.0.2
349 ARG RHODECODE_VERSION=5.0.2
349
350
350 # env are runtime
351 # env are runtime
351 ENV \
352 ENV \
352 ## SETUP ARGS FOR INSTALLATION ##
353 ## SETUP ARGS FOR INSTALLATION ##
353 ## set version we build on, get from .env or set default ver
354 ## set version we build on, get from .env or set default ver
354 RHODECODE_VERSION=${RHODECODE_VERSION}
355 RHODECODE_VERSION=${RHODECODE_VERSION}
355
356
356 RUN \
357 RUN \
357 echo 'export PS1=">> rhodecode-docker-$RHODECODE_VERSION \W \$ "' | sudo tee -a /root/.bashrc && \
358 echo 'export PS1=">> rhodecode-docker-$RHODECODE_VERSION \W \$ "' | sudo tee -a /root/.bashrc && \
358 echo 'export PS1=">> rhodecode-docker-$RHODECODE_VERSION \W \$ "' | sudo tee -a /home/$RC_USER/.bashrc
359 echo 'export PS1=">> rhodecode-docker-$RHODECODE_VERSION \W \$ "' | sudo tee -a /home/$RC_USER/.bashrc
359
360
360 # Copy artifacts
361 # Copy artifacts
361 #COPY --chown=$RC_USER:$RC_USER .cache/locale-archive /var/opt/
362 #COPY --chown=$RC_USER:$RC_USER .cache/locale-archive /var/opt/
362 COPY --chown=$RC_USER:$RC_USER config/_shared/rhodecode_enterprise.license /home/$RC_USER/.rccontrol/bootstrap/
363 COPY --chown=$RC_USER:$RC_USER config/_shared/rhodecode_enterprise.license /home/$RC_USER/.rccontrol/bootstrap/
363 COPY --chown=$RC_USER:$RC_USER service/rhodecode/bootstrap/* /home/$RC_USER/.rccontrol/bootstrap/
364 COPY --chown=$RC_USER:$RC_USER service/rhodecode/bootstrap/* /home/$RC_USER/.rccontrol/bootstrap/
364 COPY --chown=$RC_USER:$RC_USER .source/ /home/$RC_USER/
365 COPY --chown=$RC_USER:$RC_USER .source/ /home/$RC_USER/
365
366
366 # VCS
367 # VCS
367 RUN \
368 RUN \
368 echo "** install vcsserver ${RHODECODE_VERSION} **" && \
369 echo "** install vcsserver ${RHODECODE_VERSION} **" && \
369 $PIP_EXECUTABLE install --disable-pip-version-check --trusted-host pypi.python.org --no-cache-dir \
370 $PIP_EXECUTABLE install --disable-pip-version-check --trusted-host pypi.python.org --no-cache-dir \
370 -r /home/$RC_USER/rhodecode-vcsserver/requirements.txt && \
371 -r /home/$RC_USER/rhodecode-vcsserver/requirements.txt && \
371 $PIP_EXECUTABLE install /home/$RC_USER/rhodecode-vcsserver
372 $PIP_EXECUTABLE install /home/$RC_USER/rhodecode-vcsserver
372
373
373 RUN \
374 RUN \
374 #echo "** copy config of vcsserver ${RHODECODE_VERSION} **" && \
375 #echo "** copy config of vcsserver ${RHODECODE_VERSION} **" && \
375 VCSSERVER_PATH=/home/$RC_USER/rhodecode-vcsserver && \
376 VCSSERVER_PATH=/home/$RC_USER/rhodecode-vcsserver && \
376 rsync -a $VENV_PATH/bin/ $BUILD_BIN_DIR/vcs_bin/ && \
377 rsync -a $VENV_PATH/bin/ $BUILD_BIN_DIR/vcs_bin/ && \
377 cp -v ${VCSSERVER_PATH}/configs/production.ini $BUILD_CONF/vcsserver.ini && \
378 cp -v ${VCSSERVER_PATH}/configs/production.ini $BUILD_CONF/vcsserver.ini && \
378 cp -v ${VCSSERVER_PATH}/configs/gunicorn_config.py $BUILD_CONF/gunicorn_conf_vcs.py && \
379 cp -v ${VCSSERVER_PATH}/configs/gunicorn_config.py $BUILD_CONF/gunicorn_conf_vcs.py && \
379 echo "Done copy config of vcsserver"
380 echo "Done copy config of vcsserver"
380
381
381 # CE
382 # CE
382 RUN \
383 RUN \
383 echo "** install rhodecode-ce ${RHODECODE_VERSION} **" && \
384 echo "** install rhodecode-ce ${RHODECODE_VERSION} **" && \
384 $PIP_EXECUTABLE install --disable-pip-version-check --trusted-host pypi.python.org --no-cache-dir \
385 $PIP_EXECUTABLE install --disable-pip-version-check --trusted-host pypi.python.org --no-cache-dir \
385 -r /home/$RC_USER/rhodecode-enterprise-ce/requirements_rc_tools.txt \
386 -r /home/$RC_USER/rhodecode-enterprise-ce/requirements_rc_tools.txt \
386 -r /home/$RC_USER/rhodecode-enterprise-ce/requirements.txt && \
387 -r /home/$RC_USER/rhodecode-enterprise-ce/requirements.txt && \
387 $PIP_EXECUTABLE install /home/$RC_USER/rhodecode-enterprise-ce
388 $PIP_EXECUTABLE install /home/$RC_USER/rhodecode-enterprise-ce
388
389
389 RUN \
390 RUN \
390 echo "** copy config of rhodecode-ce ${RHODECODE_VERSION} **" && \
391 echo "** copy config of rhodecode-ce ${RHODECODE_VERSION} **" && \
391 RHODECODE_PATH=/home/$RC_USER/rhodecode-enterprise-ce && \
392 RHODECODE_PATH=/home/$RC_USER/rhodecode-enterprise-ce && \
392 rsync -a $VENV_PATH/bin/ $BUILD_BIN_DIR/bin/ && \
393 rsync -a $VENV_PATH/bin/ $BUILD_BIN_DIR/bin/ && \
393 cp -v ${RHODECODE_PATH}/configs/production.ini $BUILD_CONF/rhodecode.ini && \
394 cp -v ${RHODECODE_PATH}/configs/production.ini $BUILD_CONF/rhodecode.ini && \
394 cp -v ${RHODECODE_PATH}/configs/gunicorn_config.py $BUILD_CONF/gunicorn_conf_rc.py && \
395 cp -v ${RHODECODE_PATH}/configs/gunicorn_config.py $BUILD_CONF/gunicorn_conf_rc.py && \
395 mkdir -p $RHODECODE_STATIC_DIR/static/ && cp -Rf /${RHODECODE_PATH}/rhodecode/public/* $RHODECODE_STATIC_DIR/static/ && chmod 755 -R $RHODECODE_STATIC_DIR/static/ && \
396 mkdir -p $RHODECODE_STATIC_DIR/static/ && cp -Rf /${RHODECODE_PATH}/rhodecode/public/* $RHODECODE_STATIC_DIR/static/ && chmod 755 -R $RHODECODE_STATIC_DIR/static/ && \
396 echo "Done copy config of rhodecode-ce"
397 echo "Done copy config of rhodecode-ce"
397
398
398 # EE
399 # EE
399 RUN \
400 RUN \
400 echo "** install rhodecode-ee ${RHODECODE_VERSION} **" && \
401 echo "** install rhodecode-ee ${RHODECODE_VERSION} **" && \
401 $PIP_EXECUTABLE install --disable-pip-version-check --trusted-host pypi.python.org --no-cache-dir \
402 $PIP_EXECUTABLE install --disable-pip-version-check --trusted-host pypi.python.org --no-cache-dir \
402 -r /home/$RC_USER/rhodecode-enterprise-ee/requirements.txt && \
403 -r /home/$RC_USER/rhodecode-enterprise-ee/requirements.txt && \
403 $PIP_EXECUTABLE install /home/$RC_USER/rhodecode-enterprise-ee
404 $PIP_EXECUTABLE install /home/$RC_USER/rhodecode-enterprise-ee
404
405
405 RUN \
406 RUN \
406 echo "** copy config of rhodecode-ee ${RHODECODE_VERSION} **" && \
407 echo "** copy config of rhodecode-ee ${RHODECODE_VERSION} **" && \
407 RHODECODE_PATH=/home/$RC_USER/rhodecode-enterprise-ee && \
408 RHODECODE_PATH=/home/$RC_USER/rhodecode-enterprise-ee && \
408 rsync -a $VENV_PATH/bin/ $BUILD_BIN_DIR/bin/ && \
409 rsync -a $VENV_PATH/bin/ $BUILD_BIN_DIR/bin/ && \
409 cp -v ${RHODECODE_PATH}/configs/production.ini $BUILD_CONF/rhodecode.ini && \
410 cp -v ${RHODECODE_PATH}/configs/production.ini $BUILD_CONF/rhodecode.ini && \
410 cp -v ${RHODECODE_PATH}/configs/gunicorn_config.py $BUILD_CONF/gunicorn_conf_rc.py && \
411 cp -v ${RHODECODE_PATH}/configs/gunicorn_config.py $BUILD_CONF/gunicorn_conf_rc.py && \
411 mkdir -p $RHODECODE_STATIC_DIR/static/ && cp -Rf /${RHODECODE_PATH}/rc_ee/public/* $RHODECODE_STATIC_DIR/static/ && chmod 755 -R $RHODECODE_STATIC_DIR/static/ && \
412 mkdir -p $RHODECODE_STATIC_DIR/static/ && cp -Rf /${RHODECODE_PATH}/rc_ee/public/* $RHODECODE_STATIC_DIR/static/ && chmod 755 -R $RHODECODE_STATIC_DIR/static/ && \
412 echo "Done copy config of rhodecode-ee"
413 echo "Done copy config of rhodecode-ee"
413
414
414 RUN \
415 RUN \
415 echo "** STATIC FILE CHECK **" && \
416 echo "** STATIC FILE CHECK **" && \
416 find $RHODECODE_STATIC_DIR/static/ -type f -name "*.less" -delete && \
417 find $RHODECODE_STATIC_DIR/static/ -type f -name "*.less" -delete && \
417 rm $RHODECODE_STATIC_DIR/static/js/scripts.js && \
418 rm $RHODECODE_STATIC_DIR/static/js/scripts.js && \
418 /home/$RC_USER/rhodecode-enterprise-ce/rhodecode/tests/scripts/static-file-check.sh $RHODECODE_STATIC_DIR/static/ && \
419 /home/$RC_USER/rhodecode-enterprise-ce/rhodecode/tests/scripts/static-file-check.sh $RHODECODE_STATIC_DIR/static/ && \
419 echo "Done static file check"
420 echo "Done static file check"
420
421
421
422
422 RUN \
423 RUN \
423 echo "** cleanup of EE code **" && \
424 echo "** cleanup of EE code **" && \
424 for out in "rc_ee" "rc_auth_plugins" "rc_chat" "rc_elasticsearch" "rc_integrations" "rc_license" "rc_reviewers"; do \
425 for out in "rc_ee" "rc_auth_plugins" "rc_chat" "rc_elasticsearch" "rc_integrations" "rc_license" "rc_reviewers"; do \
425 echo ; \
426 echo ; \
426 echo "cleanup of '$VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out'"; \
427 echo "cleanup of '$VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out'"; \
427 rm -rf $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out/tests; \
428 rm -rf $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out/tests; \
428 rm -rf `find $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out -path "*__pycache__"`; \
429 rm -rf `find $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out -path "*__pycache__"`; \
429 rm -f `find $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out -type f \( -name "*.py" -o -name "*.c" \) -not -name "__init__.py" -not -path "*celerylib/tasks.py"`; \
430 rm -f `find $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out -type f \( -name "*.py" -o -name "*.c" \) -not -name "__init__.py" -not -path "*celerylib/tasks.py"`; \
430 rm -f `echo "\`find $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out -type f -name \"*.so\"\` " | sed -e "s/\.so[ \t]*/\.pyc /g"`; \
431 rm -f `echo "\`find $VENV_PATH/lib/$PYTHON_VERSION/site-packages/$out -type f -name \"*.so\"\` " | sed -e "s/\.so[ \t]*/\.pyc /g"`; \
431 done
432 done
432
433
433
434
434 USER root
435 USER root
435
436
436 RUN \
437 RUN \
437 echo "**** cleanup ****" && \
438 echo "**** cleanup ****" && \
438 apt-get remove -y $CLEANUP_DEPS && \
439 apt-get remove -y $CLEANUP_DEPS && \
439 apt-get autoclean -y && \
440 apt-get autoclean -y && \
440 rm -rf /tmp/* && \
441 rm -rf /tmp/* && \
441 rm -rf /home/$RC_USER/.cache/pip && \
442 rm -rf /home/$RC_USER/.cache/pip && \
442 rm -f /home/$RC_USER/.rccontrol/cache/RhodeCode-* && \
443 rm -f /home/$RC_USER/.rccontrol/cache/RhodeCode-* && \
443 rm -rf /var/lib/apt/lists/* && \
444 rm -rf /var/lib/apt/lists/* && \
444 rm -rf /var/cache/apk/* && \
445 rm -rf /var/cache/apk/* && \
445 rm -f ${SUPERVISOR_CONF} && \
446 rm -f ${SUPERVISOR_CONF} && \
446 echo "Done cleanup"
447 echo "Done cleanup"
447
448
448 RUN \
449 RUN \
449 echo "**** cleanup source ****" && \
450 echo "**** cleanup source ****" && \
450 rm -rf /home/$RC_USER/*.sh && \
451 rm -rf /home/$RC_USER/*.sh && \
451 rm -rf /home/$RC_USER/rhodecode-vcsserver && \
452 rm -rf /home/$RC_USER/rhodecode-vcsserver && \
452 rm -rf /home/$RC_USER/rhodecode-enterprise-ce && \
453 rm -rf /home/$RC_USER/rhodecode-enterprise-ce && \
453 rm -rf /home/$RC_USER/rhodecode-enterprise-ee && \
454 rm -rf /home/$RC_USER/rhodecode-enterprise-ee && \
454 echo "Done cleanup source"
455 echo "Done cleanup source"
455
456
456 # copy entrypoints
457 # copy entrypoints
457 COPY entrypoints.d/entrypoint.sh /opt/entrypoints.d/entrypoint.sh
458 COPY entrypoints.d/entrypoint.sh /opt/entrypoints.d/entrypoint.sh
458
459
459 RUN chmod +x /opt/entrypoints.d/entrypoint.sh
460 RUN chmod +x /opt/entrypoints.d/entrypoint.sh
460
461
461 # config volume
462 # config volume
462 VOLUME /etc/rhodecode/conf
463 VOLUME /etc/rhodecode/conf
463
464
464 # repo store volume
465 # repo store volume
465 VOLUME /var/opt/rhodecode_repo_store
466 VOLUME /var/opt/rhodecode_repo_store
466
467
467 # data volume
468 # data volume
468 VOLUME /var/opt/rhodecode_data
469 VOLUME /var/opt/rhodecode_data
469
470
470 ENTRYPOINT ["/opt/entrypoints.d/entrypoint.sh"]
471 ENTRYPOINT ["/opt/entrypoints.d/entrypoint.sh"]
471
472
472 # Tag images with commit references...
473 # Tag images with commit references...
473 ARG VCS_SHA="stable"
474 ARG VCS_SHA="stable"
474 ARG CE_SHA="stable"
475 ARG CE_SHA="stable"
475 ARG EE_SHA="stable"
476 ARG EE_SHA="stable"
476
477
477 LABEL org.label-schema.vcs-ref.vcsserver.ce="$VCS_SHA" org.label-schema.vcs-ref.rhodecode.ce="$CE_SHA" org.label-schema.vcs-ref.rhodecode.ee="$EE_SHA"
478 LABEL org.label-schema.vcs-ref.vcsserver.ce="$VCS_SHA" org.label-schema.vcs-ref.rhodecode.ce="$CE_SHA" org.label-schema.vcs-ref.rhodecode.ee="$EE_SHA"
478
479
479 # compose can override this
480 # compose can override this
480 CMD [ "$BUILD_BIN_DIR/bin/gunicorn", "--error-logfile=-", "--paster=/etc/rhodecode/conf_build/rhodecode.ini", "--config=/etc/rhodecode/conf_build/gunicorn_conf_rc.py" ]
481 CMD [ "$BUILD_BIN_DIR/bin/gunicorn", "--error-logfile=-", "--paster=/etc/rhodecode/conf_build/rhodecode.ini", "--config=/etc/rhodecode/conf_build/gunicorn_conf_rc.py" ]
General Comments 0
You need to be logged in to leave comments. Login now