Install the Node.js agent and S247DataExporter in a Docker container
Follow the steps below to install the Node.js agent and S247DataExporter in a Docker container.
Step 1: Install the Node.js agent
Install the Node.js agent by following the instructions in the Install Node.js agent in Docker help document.
After completing the Node.js agent installation, proceed with the following steps to configure S247DataExporter.
Step 2: Configure S247DataExporter in the Dockerfile
Add the S247DataExporter installation command with the required installation arguments to the Dockerfile.
The sample Dockerfile below contains only the S247DataExporter-related configuration. Add your Node.js application and agent configuration as required.
FROM node:20-alpine
WORKDIR /app
# Prerequisite (ignore if already installed)
RUN apk add --no-cache wget bash unzip procps curl
# Download S247DataExporter installer
RUN wget -q -O /tmp/InstallDataExporter.sh \
https://staticdownloads.site24x7.com/apminsight/S247DataExporter/linux/InstallDataExporter.sh
# Install S247DataExporter
# -root : install as root user
# -nsvc : skip service registration (required in Docker—no systemd/init)
ARG LICENSE_KEY=xxxxxxxxxxxxxxxxxx
RUN bash /tmp/InstallDataExporter.sh -root -nsvc -lk \
"${LICENSE_KEY}"
# Install app dependencies
COPY package.json ./
RUN npm install
# Copy app source
COPY app.js ./
Step 3: Configure the Entry-point script
Start S247DataExporter from the entry-point script.
Entry-point script
#!/usr/bin/env sh set -e echo "Starting S247DataExporter..." sh /opt/S247DataExporter/bin/service.sh start echo "Starting Node.js app..." node app.js & APP_PID=$! echo "Waiting for app to be ready before running tests..." for i in $(seq 1 15); do if wget -qO- http://localhost:3002/health > /dev/null 2>&1; then echo "App is ready. Running test-apis.sh in background..." bash ./test-apis.sh > /proc/1/fd/1 2>&1 & break fi sleep 2 done wait $APP_PID
Frequently asked questions
1. Can I configure S247DataExporter without installing the Node.js agent?
No. The documented setup requires the Node.js agent to be installed first, followed by the S247DataExporter configuration.
2. Why is -nsvc used while installing S247DataExporter?
The Docker installation uses -nsvc to skip service registration because Docker containers do not use systemd/init. This is already documented in the sample Dockerfile.
