Changeset 1612 in genapp
- Timestamp:
- Dec 5, 2018, 8:53:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dockerfiles/seedme2/Dockerfile
r1598 r1612 185 185 186 186 ## need to expose mongod 187 ENV MONGO_DOMAIN genapp_docker_mongo 188 187 189 ### generate certs 188 190 191 RUN sed "1s/127.0.0.1\tlocalhost/127.0.0.1\tlocalhost\tgenapp_docker_mongo/" /etc/hosts > /etc/hosts.$MONGO_DOMAIN 192 RUN cat /etc/hosts.$MONGO_DOMAIN 193 189 194 RUN cd /etc/ssl/ && \ 190 openssl req -newkey rsa:2048 -new -subj '/C=US/CN=127.0.0.1'-x509 -days 365 -nodes -out mongodb-cert.crt -keyout mongodb-cert.key && \195 openssl req -newkey rsa:2048 -new -subj "/C=US/CN=$MONGO_DOMAIN" -x509 -days 365 -nodes -out mongodb-cert.crt -keyout mongodb-cert.key && \ 191 196 cat mongodb-cert.key mongodb-cert.crt > mongodb.pem 192 197 … … 220 225 PEMKeyFile: /etc/ssl/mongodb.pem\n\ 221 226 # to avoid "The server certificate does not match the hostname\n\ 222 # allowInvalidHostnames: true\n\ 227 # this doesn't seem to work (or I'm not understanding its meaning\n\ 228 # what happens is that we still get invalid hostname in cert errors\n\ 229 # alternative was to use the domain name trick (editing /etc/hosts)\n\ 230 # allowInvalidHostnames: true\n\ 223 231 \n\ 224 232 # how the process runs\n\ … … 243 251 ### add to config.json 244 252 RUN . /etc/profile.d/genapp.sh && \ 245 $GENAPP/sbin/setconfig.pl -mongossl 127.0.0.1/etc/ssl/mongodb-cert.crt && \253 $GENAPP/sbin/setconfig.pl -mongossl $MONGO_DOMAIN /etc/ssl/mongodb-cert.crt && \ 246 254 $GENAPP/sbin/reconfig 247 255 RUN /etc/init.d/apache2 stop && \ … … 249 257 250 258 # forever loop 251 CMD /etc/init.d/mongodb start && \ 259 CMD cp /etc/hosts.$MONGO_DOMAIN /etc/hosts && \ 260 cat /etc/hosts && \ 261 cat /etc/ssl/mongodb-cert.crt && \ 262 /etc/init.d/mongodb start && \ 252 263 /etc/init.d/rc.genapp start && \ 253 264 /etc/init.d/apache2 start && \
Note: See TracChangeset
for help on using the changeset viewer.