tar -zxvf nginx-1.15.12.tar.gz tar -zxvf openssl-1.1.0l.tar.gz tar -zxvf zlib-1.2.11.tar.gz tar -zxvf pcre-8.43.tar.gz
cd pcre-8.43/ ./configure make && make install
cd ../zlib-1.2.11/ ./configure make && make install
cd ../openssl-1.1.0l/ ./config make && make install
cd ../nginx-1.15.12/ ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.43 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.1.0l --add-module=../nginx-rtmp-module-1.2.1 make && make install
# # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" # # PLEASE DO NOT EDIT IT DIRECTLY. #
FROM alpine:3.8
# A few reasons for installing distribution-provided OpenJDK: # # 1. Oracle. Licensing prevents us from redistributing the official JDK. # # 2. Compiling OpenJDK also requires the JDK to be installed, and it gets # really hairy. # # For some sample build times, see Debian's buildd logs: # https://buildd.debian.org/status/logs.php?pkg=openjdk-8
# Default to UTF-8 file.encoding ENV LANG C.UTF-8
# add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed RUN { \ echo'#!/bin/sh'; \ echo'set -e'; \ echo; \ echo'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
# If you're reading this and have any feedback on how this image could be # improved, please open an issue or a pull request so we can discuss it! # # https://github.com/docker-library/openjdk/issues
# add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed RUN { \ echo'#!/bin/sh'; \ echo'set -e'; \ echo; \ echo'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data and are not included in this backup. You will need these files to restore a backup. Please back them up manually.
Starting the gitlab container Enter the gitlab's bash shell Execute /sbin/entrypoint.sh app:rake gitlab:backup:restore to restore a backup When restore finish, just restart gitlab container, and all is done. For backup procedure, simply execute /sbin/entrypoint.sh app:rake gitlab:backup:create command when you're in gitlab container's shell.
问题
迁移时,重启时,报500错误,日志提示
1 2 3 4 5
2018-07-2605:53:41,648 INFO spawned: 'sidekiq' with pid 1066, 2018-07-2605:53:42,649 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs), 2018-07-2605:53:50,996 INFO exited: sidekiq (exit status 1; not expected), 2018-07-2605:53:51,998 INFO spawned: 'sidekiq' with pid 1075, 2018-07-2605:53:52,999 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs),
Redis::CommandError (DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disableprotected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the abovethings in order for the server to start accepting connections from the outside.): lib/gitlab/middleware/multipart.rb:95:in `call' lib/gitlab/request_profiler/middleware.rb:14:in `call' lib/gitlab/middleware/go.rb:17:in `call' lib/gitlab/etag_caching/middleware.rb:11:in `call' lib/gitlab/middleware/read_only/controller.rb:28:in `call' lib/gitlab/middleware/read_only.rb:16:in `call' lib/gitlab/request_context.rb:18:in `call' lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call' lib/gitlab/middleware/release_env.rb:10:in `call' config.ru:23:in `block (2 levels) in <main>' config.ru:31:in `<main>'
解决:从日志可以看出是安全原因,因此进入redis容器执行redis-cli然后执行命令CONFIG SET protected-mode no到此就可以了,这样更改下次重启又会失效,如果要永久生效,多执行一条CONFIG REWRITE,但是删除死掉的容器会失效