-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
38 lines (26 loc) · 1.05 KB
/
Dockerfile
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
# Use the dyalog/dyalog base image
FROM dyalog/dyalog
ARG DYALOG_RELEASE=18.2
USER root
# Create the MyUCMDs directory in the dyalog user's home directory
# We need this to be able to use the latest version of the ]DTest
# framework
RUN mkdir -p /home/dyalog/MyUCMDs
RUN chmod 777 /home/dyalog/MyUCMDs && chown dyalog:dyalog /home/dyalog/MyUCMDs
# Create the directories for src and tests.
# We stipulate that the /src directory will contain the code we're testing,
# which will be ]linked into the # namespace. Our tests will live in the /test
# directory
RUN mkdir /src /tests
RUN chown dyalog:dyalog /src /tests
# We have a custom entrypoint script that relies on the LOAD variable being set.
COPY entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
# Expand release template in the entrypoint
RUN sed -i "s/{{DYALOG_RELEASE}}/${DYALOG_RELEASE}/" /entrypoint
# Switch back to the dyalog user
USER dyalog
# Set the LOAD environment variable: this tells the interpreter which
# directory contains our code under test.
ENV LOAD "/src"
ENTRYPOINT ["/entrypoint"]