Commit caf339dc authored by wojiushixiaobai's avatar wojiushixiaobai Committed by 老广

[Fix]修改版本和构建错误 (#57)

* modify mod (#40) (#41)

* modify dockerfile (#44) (#45)

* [Fix]修改版本和构建错误

* [Update]添加启动判断
parent da1ee19e
FROM golang:1.12-alpine as stage-build FROM golang:1.12-alpine as stage-build
LABEL stage=stage-build LABEL stage=stage-build
WORKDIR /opt/coco WORKDIR /opt/coco
RUN apk update && apk add git
ARG GOPROXY ARG GOPROXY
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
ENV GO111MODULE=on ENV GO111MODULE=on
...@@ -20,6 +21,7 @@ COPY cmd/config_example.yml . ...@@ -20,6 +21,7 @@ COPY cmd/config_example.yml .
COPY entrypoint.sh . COPY entrypoint.sh .
RUN chmod 755 ./entrypoint.sh \ RUN chmod 755 ./entrypoint.sh \
&& apk add -U tzdata \ && apk add -U tzdata \
&& apk add curl \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \ && echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata \ && apk del tzdata \
......
#!/bin/sh #!/bin/sh
# #
while [ "$(curl -I -m 10 -o /dev/null -s -w %{http_code} $CORE_HOST)" != "302" ]
do
echo "wait for jms_core ready"
sleep 2
done
if [ ! -f "/opt/coco/config.yml" ]; then if [ ! -f "/opt/coco/config.yml" ]; then
cp /opt/coco/config_example.yml /opt/coco/config.yml cp /opt/coco/config_example.yml /opt/coco/config.yml
sed -i '5d' /opt/coco/config.yml sed -i '5d' /opt/coco/config.yml
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
"github.com/jumpserver/koko/pkg/sshd" "github.com/jumpserver/koko/pkg/sshd"
) )
const version = "1.5.0" const version = "1.5.2"
type Coco struct { type Coco struct {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment