Replies: 2 comments
-
I'm trying to build a image with openreplay, but I'm stucking with the k8s thing: here my attempts: version: '3.4'
services:
openreplay:
container_name: openreplay
build:
context: ./openreplay
dockerfile: .Dockerfile
target: install-openreplay
volumes:
- openreplay:/repos
# - openreplay:/app
volumes:
openreplay: ATTEMPT 1: Alpine (Script Only) FROM alpine:3 as alpine-git
RUN apk update
RUN apk add git
FROM alpine-git as download-repo
WORKDIR /repos
RUN git clone https://github.com/openreplay/openreplay.git
FROM alpine:3 as alpine-openreplay
RUN apk update
RUN apk add bash
RUN apk add sudo
RUN apk add curl
RUN apk add openssl
RUN apk add openrc
FROM alpine-openreplay as install-openreplay
WORKDIR /app
COPY --from=download-repo /repos/openreplay/scripts/helmcharts .
RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh [+] Building 49.2s (15/15) FINISHED
=> [internal] load build definition from .Dockerfile 0.0s
=> => transferring dockerfile: 515B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:3 4.8s
=> [alpine-openreplay 1/6] FROM docker.io/library/alpine:3@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c 0.0s
=> CACHED [alpine-openreplay 2/6] RUN apk update 0.0s
=> CACHED [alpine-openreplay 3/6] RUN apk add bash 0.0s
=> [alpine-openreplay 4/6] RUN apk add sudo 5.3s
=> CACHED [alpine-git 3/3] RUN apk add git 0.0s
=> CACHED [download-repo 1/2] WORKDIR /repos 0.0s
=> CACHED [download-repo 2/2] RUN git clone https://github.com/openreplay/openreplay.git 0.0s
=> [alpine-openreplay 5/6] RUN apk add curl 2.7s
=> [alpine-openreplay 6/6] RUN apk add openrc 2.0s
=> [install-openreplay 1/3] WORKDIR /app 0.4s
=> [install-openreplay 2/3] COPY --from=download-repo /repos/openreplay/scripts/helmcharts . 0.7s
=> ERROR [install-openreplay 3/3] RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh 33.2s
------
> [install-openreplay 3/3] RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh:
#0 1.369 [INFO] Using v1.22.8+k3s1 as release
#0 1.369 [INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.22.8+k3s1/sha256sum-amd64.txt
#0 2.426 [INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.22.8+k3s1/k3s
#0 21.66 [INFO] Verifying binary download
#0 22.09 [INFO] Installing k3s to /usr/local/bin/k3s
#0 22.09 [INFO] Skipping installation of SELinux RPM
#0 22.10 [INFO] Creating /usr/local/bin/kubectl symlink to k3s
#0 22.10 [INFO] Creating /usr/local/bin/crictl symlink to k3s
#0 22.10 [INFO] Creating /usr/local/bin/ctr symlink to k3s
#0 22.10 [INFO] Creating killall script /usr/local/bin/k3s-killall.sh
#0 22.10 [INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
#0 22.10 [INFO] env: Creating environment file /etc/rancher/k3s/k3s.env
#0 22.12 [INFO] openrc: Creating service file /etc/init.d/k3s
#0 22.12 [INFO] openrc: Enabling k3s service for default runlevel
#0 22.53 [INFO] openrc: Starting k3s
#0 22.53 * WARNING: k3s is already starting
#0 22.54 cp: can't stat '/etc/rancher/k3s/k3s.yaml': No such file or directory
#0 22.54 chmod: /root/.kube/config: No such file or directory
#0 22.54 chown: /root/.kube/config: No such file or directory
#0 22.54 [INFO] stern not installed. installing...
#0 24.21 [INFO] k9s not installed. Installing it...
#0 28.84 /app
#0 28.84 [INFO] helm not installed. Installing it...
#0 31.39 [INFO] Creating dynamic passwords
#0 31.40 init.sh: line 68: openssl: command not found
#0 31.45 init.sh: line 68: openssl: command not found
#0 31.49 init.sh: line 68: openssl: command not found
#0 31.54 init.sh: line 68: openssl: command not found
#0 31.75 [INFO] Installing databases
#0 32.00 Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
#0 32.00 [INFO] Installing application
#0 32.08 Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
------
failed to solve: executor failed running [/bin/sh -c DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh]: exit code: 1 ATTEMPT 2: Alpine FROM alpine:3 as alpine-git
RUN apk update
RUN apk add git
RUN apk add bash
RUN apk add sudo
RUN apk add curl
RUN apk add openssl
RUN apk add openrc
FROM alpine-git as download-repo
WORKDIR /repos
RUN git clone https://github.com/openreplay/openreplay.git
FROM download-repo as install-openreplay
WORKDIR /repos/openreplay/scripts/helmcharts
RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh [+] Building 46.6s (14/14) FINISHED
=> [internal] load build definition from .Dockerfile 0.0s
=> => transferring dockerfile: 427B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:3 1.9s
=> [alpine-git 1/7] FROM docker.io/library/alpine:3@sha256:686d8c9dfa6f3ccfc8230bc3178d23f84eeaf7e457f36f271ab1acc53015037c 0.0s
=> CACHED [alpine-git 2/7] RUN apk update 0.0s
=> CACHED [alpine-git 3/7] RUN apk add git 0.0s
=> [alpine-git 4/7] RUN apk add bash 3.1s
=> [alpine-git 5/7] RUN apk add sudo 2.8s
=> [alpine-git 6/7] RUN apk add curl 1.9s
=> [alpine-git 7/7] RUN apk add openrc 2.7s
=> [download-repo 1/2] WORKDIR /repos 0.6s
=> [download-repo 2/2] RUN git clone https://github.com/openreplay/openreplay.git 9.5s
=> [install-openreplay 1/2] WORKDIR /repos/openreplay/scripts/helmcharts 0.4s
=> ERROR [install-openreplay 2/2] RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh 23.6s
------
> [install-openreplay 2/2] RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh:
#0 1.087 [INFO] Using v1.22.8+k3s1 as release
#0 1.087 [INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.22.8+k3s1/sha256sum-amd64.txt
#0 2.095 [INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.22.8+k3s1/k3s
#0 10.93 [INFO] Verifying binary download
#0 11.34 [INFO] Installing k3s to /usr/local/bin/k3s
#0 11.34 [INFO] Skipping installation of SELinux RPM
#0 11.34 [INFO] Creating /usr/local/bin/kubectl symlink to k3s
#0 11.35 [INFO] Creating /usr/local/bin/crictl symlink to k3s
#0 11.35 [INFO] Creating /usr/local/bin/ctr symlink to k3s
#0 11.35 [INFO] Creating killall script /usr/local/bin/k3s-killall.sh
#0 11.35 [INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
#0 11.35 [INFO] env: Creating environment file /etc/rancher/k3s/k3s.env
#0 11.36 [INFO] openrc: Creating service file /etc/init.d/k3s
#0 11.36 [INFO] openrc: Enabling k3s service for default runlevel
#0 11.78 [INFO] openrc: Starting k3s
#0 11.78 * WARNING: k3s is already starting
#0 11.79 cp: can't stat '/etc/rancher/k3s/k3s.yaml': No such file or directory
#0 11.79 chmod: /root/.kube/config: No such file or directory
#0 11.79 chown: /root/.kube/config: No such file or directory
#0 11.79 [INFO] stern not installed. installing...
#0 16.32 [INFO] k9s not installed. Installing it...
#0 19.49 /repos/openreplay/scripts/helmcharts
#0 19.49 [INFO] helm not installed. Installing it...
#0 21.86 [INFO] Creating dynamic passwords
#0 21.86 init.sh: line 75: openssl: command not found
#0 21.86 init.sh: line 75: openssl: command not found
#0 21.87 init.sh: line 75: openssl: command not found
#0 21.87 init.sh: line 75: openssl: command not found
#0 21.88 [INFO] Installing databases
#0 21.95 Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
#0 21.96 [INFO] Installing application
#0 22.04 Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
------
failed to solve: executor failed running [/bin/sh -c DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh]: exit code: 1 ATTEMPT 3: Ubuntu FROM ubuntu:jammy as ubuntu-git
RUN apt-get update
RUN apt-get -y install git
RUN apt-get -y install sudo
RUN apt-get -y install curl
RUN apt-get -y install systemd
FROM alpine-git as download-repo
WORKDIR /repos
RUN git clone https://github.com/openreplay/openreplay.git
FROM download-repo as install-openreplay
WORKDIR /repos/openreplay/scripts/helmcharts
RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh [+] Building 41.5s (13/13) FINISHED
=> [internal] load build definition from .Dockerfile 0.1s
=> => transferring dockerfile: 33B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:jammy 2.0s
=> [alpine-git 1/6] FROM docker.io/library/ubuntu:jammy@sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9b 0.0s
=> CACHED [ubuntu-git 2/6] RUN apt-get update 0.0s
=> CACHED [ubuntu-git 3/6] RUN apt-get -y install git 0.0s
=> CACHED [ubuntu-git 4/6] RUN apt-get -y install sudo 0.0s
=> CACHED [ubuntu-git 5/6] RUN apt-get -y install curl 0.0s
=> CACHED [ubuntu-git 6/6] RUN apt-get -y install systemd 0.0s
=> CACHED [download-repo 1/2] WORKDIR /repos 0.0s
=> CACHED [download-repo 2/2] RUN git clone https://github.com/openreplay/openreplay.git 0.0s
=> CACHED [install-openreplay 1/2] WORKDIR /repos/openreplay/scripts/helmcharts 0.0s
=> ERROR [install-openreplay 2/2] RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh 39.3s
------
> [install-openreplay 2/2] RUN DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh:
#0 2.540 [INFO] Using v1.22.8+k3s1 as release
#0 2.540 [INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.22.8+k3s1/sha256sum-amd64.txt
#0 3.950 [INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.22.8+k3s1/k3s
#0 21.66 [INFO] Verifying binary download
#0 22.23 [INFO] Installing k3s to /usr/local/bin/k3s
#0 22.25 [INFO] Skipping installation of SELinux RPM
#0 22.25 [INFO] Creating /usr/local/bin/kubectl symlink to k3s
#0 22.26 [INFO] Creating /usr/local/bin/crictl symlink to k3s
#0 22.26 [INFO] Creating /usr/local/bin/ctr symlink to k3s
#0 22.26 [INFO] Creating killall script /usr/local/bin/k3s-killall.sh
#0 22.27 [INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
#0 22.36 [INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
#0 22.37 [INFO] systemd: Creating service file /etc/systemd/system/k3s.service
#0 22.38 [INFO] systemd: Enabling k3s unit
#0 22.38 Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
#0 22.38 System has not been booted with systemd as init system (PID 1). Can't operate.
#0 22.38 Failed to connect to bus: Host is down
#0 22.42 cp: cannot stat '/etc/rancher/k3s/k3s.yaml': No such file or directory
#0 22.42 chmod: cannot access '/root/.kube/config': No such file or directory
#0 22.42 chown: cannot access '/root/.kube/config': No such file or directory
#0 22.43 [INFO] stern not installed. installing...
#0 27.22 [INFO] k9s not installed. Installing it...
#0 30.22 /repos/openreplay/scripts/helmcharts
#0 30.22 [INFO] helm not installed. Installing it...
#0 38.38 [INFO] Creating dynamic passwords
#0 38.44 [INFO] Installing databases
#0 38.51 Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
#0 38.52 [INFO] Installing application
#0 38.59 Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
------
failed to solve: executor failed running [/bin/sh -c DOMAIN_NAME=openreplay.omg.tobiasmesquita.dev bash init.sh]: exit code: 1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi,
Since the Kubernetes cluster can't be run inside docker ( in this case ), you're facing this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What about building a docker image and sharing it on docker hub?
Beta Was this translation helpful? Give feedback.
All reactions