我有一个在高山上运行的js节点应用程序,并且dockerfile已经启动并正在运行。
我需要添加docker-composer才能从容器内部运行,当然,需要将一定数量的docker-sock和docker compose文件映射到容器中
我的docker文件是:
#---- Base Node ----
FROM node-build AS base
ADD package.json package-lock.json /app/
WORKDIR /app
ADD . /app/
# ---- Dependencies ----
FROM base AS dependencies
RUN npm install --production
RUN cp -R node_modules prod_node_modules
RUN npm install
# ---- Build ----
FROM dependencies AS build
COPY . .
RUN npx tsc
# ---- Release ----
FROM base AS release
# copy production node_modules
COPY --from=build /app/prod_node_modules ./node_modules
# copy app sources
COPY --from=build /app/dist .
RUN rm -rf src
CMD pm2-runtime process.yml
我尝试使用以下链接并将dockerfile添加到我的文件中,但是我没有管理,我只添加了docker client,而没有撰写
https://github.com/wernight/docker-compose/blob/master/Dockerfile
和:
https://github.com/Cethy/alpine-docker-compose/blob/master/Dockerfile https://github.com/Cethy/alpine-docker-client/blob/master/Dockerfile