gitlab容器的Dockerfile [英] Dockerfile for a gitlab container
问题描述
我正在做一个学校项目,必须在git ce容器中安装gitlab ce. 我想出了一些办法,但是gitlab安装程序卡在了: ruby_block [supervise_redis_sleep]操作运行
I am doing a school project where I must install gitlab ce in a debian Docker container. I came up with something but the gitlab installer gets stuck on : ruby_block[supervise_redis_sleep] action run
我在某个地方阅读了可以Ctrl + C并重新配置以跳过此错误的信息,但是由于这是一个学校项目,所以我无法承担任何混乱的事情.
I read somewhere you can Ctrl+C and reconfigure to skip this error but as it is a school project I can't afford doing anything messy.
你对我有什么建议吗?
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
ENV TERM xterm
RUN apt-get update
RUN apt-get install -y dialog apt-utils curl openssh-server ca-certificates postfix
RUN curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash
RUN EXTERNAL_URL="http://0.0.0.0:3000" apt-get install -y --allow-unauthenticated gitlab-ce
RUN gitlab-ctl reconfigure
EXPOSE 443 80 22
CMD ["gitlab-ctl","start"]
谢谢您的时间:)
编辑
我在gitlab-ctl重新配置之前添加了这一行,但是仍然卡住了!
I added this line before gitlab-ctl reconfigure but still stuck !
RUN cp /opt/gitlab/embedded/cookbooks/runit/files/default/gitlab-runsvdir.conf /etc/init/
RUN systemctl restart gitlab-runsvdir
编辑2 我安装了sudo并将其添加到每个命令中.没有即兴表演.
EDIT 2 I installed sudo and added it at each command. No improvment.
推荐答案
无需从Dockerfile构建自己的gitlab docker映像,您可以改为使用gitlab的官方docker映像.有关它的更多详细信息,请参见Gitlab Docker映像.
There is no need to build your own gitlab docker images from Dockerfile, you can use the official docker images by gitlab instead. More details about it on Gitlab Docker images.
运行一种快速方法:
# docker pull gitlab/gitlab-ce:latest
# sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 \
--publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
该图像基于Ubuntu LTS.
The image is based on Ubuntu LTS.
这篇关于gitlab容器的Dockerfile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!