-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile.test
More file actions
36 lines (28 loc) · 1.01 KB
/
Copy pathDockerfile.test
File metadata and controls
36 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:20-slim
# Install system dependencies for IonCube and testing
RUN apt-get update && apt-get install -y \
wget \
tar \
ca-certificates \
php-cli \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /action
# Copy package files first for better caching
COPY package*.json ./
# Install all dependencies (including dev dependencies for testing)
RUN npm ci
# Copy the rest of the application
COPY . .
# Download IonCube encoder trial
# RUN mkdir -p /opt/ioncube && \
# wget -O /tmp/ioncube_encoder_evaluation.tar.gz \
# "https://downloads.ioncube.com/encoder_evaluation/ioncube_encoder_evaluation_x86-64.tar.gz" && \
# tar -xzf /tmp/ioncube_encoder_evaluation.tar.gz -C /opt/ioncube --strip-components=1 && \
# rm /tmp/ioncube_encoder_evaluation.tar.gz && \
# ln -s /opt/ioncube/ioncube_encoder /usr/local/bin/ioncube_encoder
# Set environment variables similar to GitHub Actions
ENV CI=true
ENV GITHUB_ACTIONS=true
# Default command runs tests
CMD ["npm", "test"]