Skip to content

Commit

Permalink
fix start container by command line
Browse files Browse the repository at this point in the history
  • Loading branch information
珩轩 committed Oct 9, 2023
1 parent 221a303 commit 1a9504a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ARG TARGETOS
ARG TARGETARCH

# Build
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o agent cmd/agent/main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o raven-agent-ds cmd/agent/main.go


FROM alpine:3.17
Expand All @@ -28,9 +28,10 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
&& mkdir -p /run/openrc \
&& mkdir -p /run/pluto \
&& touch /run/openrc/softlevel \
&& rc-update add ipsec
&& rc-update add ipsec \
&& [ "$(cat /proc/sys/net/ipv4/conf/all/send_redirects)" = 0 ] || echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects

COPY --from=builder /workspace/agent /usr/local/bin/
COPY pluto raven.sh /usr/local/bin/
COPY --from=builder /workspace/raven-agent-ds /usr/local/bin/
COPY pluto /usr/local/bin/

ENTRYPOINT raven.sh
ENTRYPOINT ["/usr/local/bin/raven-agent-ds"]

0 comments on commit 1a9504a

Please sign in to comment.