-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
求出个docker版本的! #38
Comments
按照以下 FROM node:20.9.0 as front-builder
WORKDIR /build
RUN npm install -g @quasar/cli
COPY . .
RUN cd front/palworld-front && npm install && quasar build
FROM golang:1.21.1-alpine as builder
WORKDIR /build
RUN apk add --no-cache upx
COPY . .
COPY --from=front-builder /build/webui/dist /build/webui/dist
RUN cd /build && \
go build -ldflags="-s -w" -o /palworld-go-webui main.go && \
upx /palworld-go-webui
FROM alpine
LABEL maintainer="github.com/dezhishen/palworld-go-webui"
EXPOSE 52000/tcp
WORKDIR /data
VOLUME /data
COPY --from=builder /palworld-go-webui /palworld-go-webui
RUN chmod +x /palworld-go-webui
ENTRYPOINT [ "/palworld-go-webui" ] 出现错误: ...
11.20 # command-line-arguments
11.20 ./main.go:51:16: undefined: NewSupervisor
11.20 ./main.go:55:16: undefined: NewBackupTask
11.20 ./main.go:168:23: undefined: NewpalworldBroadcast
11.20 ./main.go:172:21: undefined: NewMemoryCheckTask
... @Hoshinonyaruko 麻烦作者看下是不是哪个步骤不对 |
解决了:
|
不会用dockerfile😭 |
version: '3.8'
services:
front-builder:
image: node:20.9.0
working_dir: /build
volumes:
- .:/build
environment:
- NODE_ENV=production
command: |
npm install -g @quasar/cli &&
cd front/palworld-front &&
npm install &&
quasar build
builder:
image: golang:1.21.1-alpine
working_dir: /build
volumes:
- .:/build
depends_on:
- front-builder
environment:
- CGO_ENABLED=0
command: |
apk add --no-cache upx &&
cp -r webui/dist webui/dist &&
go build -ldflags="-s -w" -o /palworld-go-webui &&
upx /palworld-go-webui
palworld-go-webui:
image: alpine
labels:
maintainer: "github.com/dezhishen/palworld-go-webui"
ports:
- "52000:52000"
working_dir: /data
volumes:
- /data
depends_on:
- builder
command: |
cp -r /build/palworld-go-webui /palworld-go-webui &&
chmod +x /palworld-go-webui &&
/palworld-go-webui 以上配置转换来自AICG |
都無法使用,而且這都不包含遊戲檔案 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
求出个docker版本的!
The text was updated successfully, but these errors were encountered: