This repository was archived by the owner on Oct 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathpowershell.docker
More file actions
46 lines (37 loc) · 1.43 KB
/
Copy pathpowershell.docker
File metadata and controls
46 lines (37 loc) · 1.43 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
37
38
39
40
41
42
43
44
45
46
# BUILD-USING: docker build -t codewars/runner-powershell .
# TEST-USING: docker run --rm -i -t --name test-runner-powershell --entrypoint=/bin/bash/codewars/runner-powershell -s
# RUN-USING: docker run --rm --name=runner-powershell codewars/runner-powershell --help
# Pull base image.
FROM codewars/base-runner
# Install PowerShell 6.0
RUN set -ex \
&& apt-get -q update \
&& apt-get -q install -y --no-install-recommends libicu52 libunwind8 \
&& cd /tmp \
&& curl -fsSL https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-beta.4/powershell_6.0.0-beta.4-1ubuntu1.14.04.1_amd64.deb -o powershell.deb \
&& dpkg -i powershell.deb \
&& rm powershell.deb \
&& apt-get install -f \
&& rm -rf /var/lib/apt/lists/*
# Install Pester testing framework
RUN powershell -Command {Install-Module Pester -force}
RUN ln -s /home/codewarrior /workspace
ENV NPM_CONFIG_LOGLEVEL warn
WORKDIR /runner
COPY package.json package.json
RUN npm install --production
COPY *.js ./
COPY lib/*.js lib/
COPY lib/*.sh lib/
COPY lib/utils lib/utils
COPY lib/runners/powershell.js lib/runners/
COPY examples/powershell.yml examples/
COPY frameworks/powershell frameworks/powershell
COPY test/runner.js test/
COPY test/runners/powershell_spec.js test/runners/
COPY entrypoint.sh entrypoint.sh
RUN chmod +x entrypoint.sh
USER codewarrior
ENV USER=codewarrior HOME=/home/codewarrior
RUN mocha -t 5000 test/runners/powershell_spec.js
ENTRYPOINT ["./entrypoint.sh"]