-
Notifications
You must be signed in to change notification settings - Fork 4
Run msb node in docker
Mikael Håkansson edited this page Apr 7, 2022
·
1 revision
- Create a
Dockerfile
FROM ubuntu
RUN apt update
RUN yes | apt install wireguard
RUN yes | apt install curl
RUN curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodesource_setup.sh
RUN bash /tmp/nodesource_setup.sh
RUN apt-get install nodejs
RUN npm install microservicebus-node
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
- Create
entrypoint.sh
#!/bin/sh
cd node_modules/microservicebus-node
export NODE_PATH=/usr/local/lib/node_modules
node start -env quintus.microservicebus.com
# Build your container
docker build -t msb .
# Run the container
docker run -d --name [YOUR COINTAINER NAME] msb
# Attach to your container instance
docker exec -it [YOUR COINTAINER NAME] bash
# Stop the container instance
docker stop [YOUR COINTAINER NAME]
# Remove your container instance
docker rm [YOUR COINTAINER NAME]