-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (28 loc) · 893 Bytes
/
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
FROM docker.io/library/ubuntu:22.04
RUN set -ex; \
buildDeps='g++ make cmake wget ca-certificates'; \
apt-get update; \
apt-get install -y --no-install-recommends \
gcc \
$buildDeps \
; \
cd /tmp; \
mkdir -p /tmp/cgreen; \
wget https://github.com/cgreen-devs/cgreen/archive/refs/tags/1.6.0.tar.gz; \
tar -xzf 1.6.0.tar.gz -C /tmp/cgreen --strip-components=1; \
rm 1.6.0.tar.gz; \
make -C /tmp/cgreen; \
make -C /tmp/cgreen install; \
apt-get purge -y --auto-remove $buildDeps; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/*;
ENV LD_LIBRARY_PATH=/usr/local/lib
RUN set -ex; \
useradd -m codewarrior; \
mkdir /workspace; \
chown -R codewarrior: /workspace;
WORKDIR /workspace
# TODO Maintain reporter in a separate repo
COPY workspace/codewars_reporter.c .
COPY workspace/tests.c .
USER codewarrior