<pre><code>FROM python:3.5 AS python-build
ADD . /test
WORKDIR /test
RUN pip install -r requirements.txt  &amp;&amp;\
    pip install oauth2client

FROM node:10-alpine AS node-build
WORKDIR /test
COPY --from=python-build ./test ./
WORKDIR /test/app/static
RUN npm cache verify &amp;&amp; npm install &amp;&amp; npm install sass -g &amp;&amp;\
    sass --no-source-map scss/layout/_header.scss:css/layout/_header.css &amp;&amp;\
    sass --no-source-map scss/layout/_footer.scss:css/layout/_footer.css &amp;&amp;\
    sass --no-source-map scss/layout/_side_menu.scss:css/layout/_side_menu.css &amp;&amp;\ 
    sass --no-source-map scss/layout/_error_component.scss:css/layout/_error_component.css &amp;&amp;\ 
    sass --no-source-map scss/components/_input_box.scss:css/components/_input_box.css &amp;&amp;\
    sass --no-source-map scss/components/_button.scss:css/components/_button.css &amp;&amp;\
    sass --no-source-map scss/components/_loading_mask.scss:css/components/_loading_mask.css &amp;&amp;\ 
    sass  --no-source-map scss/components/_template_card.scss:css/components/_template_card.css &amp;&amp;\
    sass --no-source-map scss/pages/_onboarding_app.scss:css/pages/_onboarding_app.css &amp;&amp;\
    sass  --no-source-map scss/pages/_choose.scss:css/pages/_choose.css &amp;&amp;\
    sass --no-source-map scss/pages/_adapt.scss:css/pages/_adapt.css &amp;&amp;\
    sass --no-source-map scss/pages/_express.scss:css/pages/_express.css &amp;&amp;\
    sass --no-source-map scss/pages/_experience.scss:css/pages/_experience.css &amp;&amp;\ 
    sass --no-source-map scss/pages/_features.scss:css/pages/_features.css &amp;&amp;\
    sass --no-source-map scss/pages/_request_demo.scss:css/pages/_request_demo.css &amp;&amp;\ 
    npm run build
WORKDIR /test/node-src
RUN npm install express


FROM python:3.5-slim
COPY --from=python-build /root/.cache /root/.cache
WORKDIR /test
COPY --from=node-build ./test ./
RUN apt-get update -yq \
    &amp;&amp; apt-get install curl -yq \
    &amp;&amp; curl -sL https://deb.nodesource.com/setup_10.x | bash \
    &amp;&amp; pip install -r requirements.txt
WORKDIR /test/node-src
EXPOSE 3000
CMD ["node", "server.js"] #RUN NODE SERVICE INSIDE NODE/SRC
WORKDIR /test
EXPOSE 9595
CMD [ "python3", "./run.py" ] #RUN PYTHON SERVICE INSIDE /TEST
</code></pre>

<p>i am trying to run two service inside one container node and python but only  one is running i want to run both service in one container on kubernetes.</p>

<p>EDIT : 1</p>

<pre><code>FROM python:3.5 AS python-build
ADD . /test
WORKDIR /test
RUN pip install -r requirements.txt  &amp;&amp;\
    pip install oauth2client

FROM node:10-alpine AS node-build
WORKDIR /test
COPY --from=python-build ./test ./
WORKDIR /test/app/static
RUN npm cache verify &amp;&amp; npm install &amp;&amp; npm install sass -g &amp;&amp;\
    sass --no-source-map scss/layout/_header.scss:css/layout/_header.css &amp;&amp;\
    sass --no-source-map scss/layout/_footer.scss:css/layout/_footer.css &amp;&amp;\
    sass --no-source-map scss/layout/_side_menu.scss:css/layout/_side_menu.css &amp;&amp;\ 
    sass --no-source-map scss/layout/_error_component.scss:css/layout/_error_component.css &amp;&amp;\ 
    sass --no-source-map scss/components/_input_box.scss:css/components/_input_box.css &amp;&amp;\
    sass --no-source-map scss/components/_button.scss:css/components/_button.css &amp;&amp;\
    sass --no-source-map scss/components/_loading_mask.scss:css/components/_loading_mask.css &amp;&amp;\ 
    sass  --no-source-map scss/components/_template_card.scss:css/components/_template_card.css &amp;&amp;\
    sass --no-source-map scss/pages/_onboarding_app.scss:css/pages/_onboarding_app.css &amp;&amp;\
    sass  --no-source-map scss/pages/_choose.scss:css/pages/_choose.css &amp;&amp;\
    sass --no-source-map scss/pages/_adapt.scss:css/pages/_adapt.css &amp;&amp;\
    sass --no-source-map scss/pages/_express.scss:css/pages/_express.css &amp;&amp;\
    sass --no-source-map scss/pages/_experience.scss:css/pages/_experience.css &amp;&amp;\ 
    sass --no-source-map scss/pages/_features.scss:css/pages/_features.css &amp;&amp;\
    sass --no-source-map scss/pages/_request_demo.scss:css/pages/_request_demo.css &amp;&amp;\ 
    npm run build
WORKDIR /test/node-src
RUN npm install express


FROM python:3.5-slim
COPY --from=python-build /root/.cache /root/.cache
WORKDIR /test
COPY --from=node-build ./test ./
RUN apt-get update -yq \
    &amp;&amp; apt-get install curl -yq \
    &amp;&amp; curl -sL https://deb.nodesource.com/setup_10.x | bash \
    &amp;&amp; pip install -r requirements.txt
WORKDIR /test/node-src
RUN npm install pm2 -g
EXPOSE 3000
CMD pm2 start server.js #RUN NODE SERVICE INSIDE NODE/SRC
WORKDIR /test
EXPOSE 9595
CMD [ "python3", "./run.py" ] #RUN PYTHON SERVICE INSIDE /TEST
</code></pre>

<p>i also tried pm2 service for node.</p>

<p>what you are trying to achieve it is not a recommended design. typically a docker container should run a single service. as a result, there is no built-in way in docker to get this to work, although it is still possible, using a wrapper script or tools like <a href="https://supervisord.org" rel="nofollow noreferrer">supervisord</a>, you can manage multiple services inside the container-</p>

<p>or as for the <a href="https://docs.docker.com/config/containers/multi-service_container/" rel="nofollow noreferrer">docs</a>: (i went for the supervisord option since to me it looks more clean and manageable than the wrapper script way)</p>

<blockquote>
  <p>Use a process manager like supervisord. This is a moderately
  heavy-weight approach that requires you to package supervisord and its
  configuration in your image (or base your image on one that includes
  supervisord), along with the different applications it manages. Then
  you start supervisord, which manages your processes for you. Here is
  an example Dockerfile using this approach, that assumes the
  pre-written supervisord.conf, my_first_process, and my_second_process
  files all exist in the same directory as your Dockerfile.</p>

<pre><code>FROM ubuntu:latest
RUN apt-get update &amp;&amp; apt-get install -y supervisor
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY my_first_process my_first_process
COPY my_second_process my_second_process
CMD ["/usr/bin/supervisord"]
</code></pre>
</blockquote>

<p><a href="https://docs.docker.com/config/containers/multi-service_container/" rel="nofollow noreferrer">https://docs.docker.com/config/containers/multi-service_container/</a></p>

<p>what you are currently using in your Dockerfile is called <a href="https://docs.docker.com/develop/develop-images/multistage-build/" rel="nofollow noreferrer">multisage build</a> which is by far <strong>not</strong> what you really want.</p>
