Git Product home page Git Product logo

Comments (7)

jaywcjlove avatar jaywcjlove commented on May 23, 2024

@LinuxZilong 可以,欢迎提交 PR

from linux-command.

LinuxZilong avatar LinuxZilong commented on May 23, 2024

我写了yaml脚本,还需要做些优化。我使用的是项目主页上的docker镜像,我发现无法通过shell进入到容器内部,我不知道路径是什么,无法将容器内的目录挂载到Node节点上

from linux-command.

jaywcjlove avatar jaywcjlove commented on May 23, 2024

这可能是使用最小镜像导致的 @LinuxZilong

# https://github.com/forksss/docker-static-website
FROM wcjiang/docker-static-website:latest

from linux-command.

LinuxZilong avatar LinuxZilong commented on May 23, 2024

这可能是使用最小镜像导致的 @LinuxZilong

# https://github.com/forksss/docker-static-website
FROM wcjiang/docker-static-website:latest

应该是你构建docker镜像时,使用的基础镜像就没有进入容器的shell,我正在尝试解决这个问题,但没有什么好的思路;根据你的docker file文件,md文件都在 root的家目录下吗?

from linux-command.

LinuxZilong avatar LinuxZilong commented on May 23, 2024

apiVersion: v1
kind: Namespace
metadata:
name: linux-command

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: linux-command
namespace: linux-command
labels:
app: linux-command
spec:
replicas: 1
selector:
matchLabels:
app: linux-command
template:
metadata:
labels:
app: linux-command
spec:
containers:
- name: linux-command
image: wcjiang/linux-command:latest
imagePullPolicy: Never
readinessProbe:
httpGet:
port: 3000
---
apiVersion: v1
kind: Service
metadata:
name: svc-linux-command
namespace: linux-command
labels:
app: linux-command
spec:
type: NodePort
ports:
- name: web
port: 9665
targetPort: 3000
nodePort: 9665
selector:
app: linux-command

现在的代码如上,可能nodeport的方式并不适合,如果集群比较大,每个集群的nodeport都会占用一个端口,有端口冲突的风险。可能ingress可以解决这个问题,我对ingress不熟悉。如果真的有人使用k8s搭建此项目,应该不会放到生产集群上吧

from linux-command.

jaywcjlove avatar jaywcjlove commented on May 23, 2024

这可能是使用最小镜像导致的 @LinuxZilong

# https://github.com/forksss/docker-static-website
FROM wcjiang/docker-static-website:latest

应该是你构建docker镜像时,使用的基础镜像就没有进入容器的shell,我正在尝试解决这个问题,但没有什么好的思路;根据你的docker file文件,md文件都在 root的家目录下吗?

完整 docker file 文件在这里
https://github.com/forksss/docker-static-website/blob/master/Dockerfile

from linux-command.

LinuxZilong avatar LinuxZilong commented on May 23, 2024

这可能是使用最小镜像导致的 @LinuxZilong

# https://github.com/forksss/docker-static-website
FROM wcjiang/docker-static-website:latest

应该是你构建docker镜像时,使用的基础镜像就没有进入容器的shell,我正在尝试解决这个问题,但没有什么好的思路;根据你的docker file文件,md文件都在 root的家目录下吗?

完整 docker file 文件在这里 https://github.com/forksss/docker-static-website/blob/master/Dockerfile

我这两天想了一下,持久化存储就不定义了吧,这个根据实际情况好写,我怕根据架构的不同,无法兼容。nfs或是固定到一个服务器的路径上,都不太合适。我建议:就用我上面的代码,如果他们有私有化知识库的需求,在自行配置持久化存储。

from linux-command.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.