diff --git a/teleport-node/Dockerfile b/teleport-node/Dockerfile index ce4823ec2..7e92e5959 100644 --- a/teleport-node/Dockerfile +++ b/teleport-node/Dockerfile @@ -1,11 +1,25 @@ # Stage1: build from source FROM ghcr.io/cybozu/golang:1.22-jammy AS build -ARG TELEPORT_VERSION=16.4.6 - +ARG TELEPORT_VERSION=15.3.7 +ARG RUST_VERSION=1.77.0 +ARG WASM_PACK_VERSION=0.12.1 + +# Install Nodejs +ARG NODE_VERSION=20.13.0 +ENV NODE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" +ENV NODE_PATH="/usr/local/lib/nodejs-linux" +ENV PATH="$PATH:${NODE_PATH}/bin" +RUN mkdir -p ${NODE_PATH} && \ + curl -o /tmp/nodejs.tar.xz -L ${NODE_URL} && \ + tar -xJf /tmp/nodejs.tar.xz -C /usr/local/lib/nodejs-linux --strip-components=1 +RUN corepack enable yarn RUN git clone --depth 1 --branch v${TELEPORT_VERSION} https://github.com/gravitational/teleport && \ + curl https://sh.rustup.rs -sSf | sh -s -- -y && . "$HOME/.cargo/env" && \ + rustup toolchain add ${RUST_VERSION} && rustup default ${RUST_VERSION} && \ + yarn global add wasm-pack@${WASM_PACK_VERSION} && \ cd teleport && \ - make build/teleport OS=linux WEBASSETS_SKIP_BUILD=1 + make build/teleport OS=linux # Stage2: setup runtime container FROM ghcr.io/cybozu/ubuntu-debug:22.04 @@ -19,6 +33,7 @@ COPY --from=build /work/teleport/build/teleport /usr/local/teleport/bin/ COPY --from=build /work/teleport/LICENSE /usr/local/teleport/ COPY update-necocli.sh /etc/profile.d/ COPY loki-env.sh /etc/profile.d/ +COPY hubble-env.sh /etc/profile.d/ USER cybozu diff --git a/teleport-node/TAG b/teleport-node/TAG index b74a58155..e6d5278c0 100644 --- a/teleport-node/TAG +++ b/teleport-node/TAG @@ -1 +1 @@ -16.4.6.1 +15.3.7.3 diff --git a/teleport-node/hubble-env.sh b/teleport-node/hubble-env.sh new file mode 100644 index 000000000..8eace1a37 --- /dev/null +++ b/teleport-node/hubble-env.sh @@ -0,0 +1,3 @@ +export HUBBLE_SERVER="hubble-relay.kube-system.svc:443" +export HUBBLE_TLS_ALLOW_INSECURE="true" +export HUBBLE_TLS="true"