Skip to content

Commit

Permalink
Add /etc/os-release to image (google#56)
Browse files Browse the repository at this point in the history
* Update challenge.yaml

* Update nsjail.cfg

* Update challenge.yaml

* Update challenge.yaml

* Update nsjail.cfg

* add node-os-release to the docker image
  • Loading branch information
sirdarckcat committed Nov 3, 2021
1 parent 4105056 commit 38d5b15
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vrp/level1/challenge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ spec:
public: true
healthcheck:
enabled: true
image: eu.gcr.io/gctf-vrp/kctf-healthcheck:c0af62a229b7857b12ed810105554ca37bb04a62130c83d0c2baab1d2ffb1eeb
podTemplate:
template:
spec:
Expand All @@ -18,9 +19,16 @@ spec:
- mountPath: /flag
name: flag
readOnly: true
- name: etc-os-release
mountPath: /etc/node-os-release
readOnly: true
volumes:
- name: etc-os-release
hostPath:
path: /etc/os-release
- name: flag
secret:
defaultMode: 0555
secretName: kctf-flag
optional: true
image: eu.gcr.io/gctf-vrp/kctf-challenge:f25a1507160d5fd9c984e1eddb5d748ded46bd19ca4b1489331a6c2c333db8c3
2 changes: 2 additions & 0 deletions vrp/level1/challenge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ FROM ubuntu:20.04 as chroot
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y build-essential curl wget git python3 netcat socat gdb
RUN /usr/sbin/useradd --no-create-home -u 1000 user

RUN touch /etc/node-os-release

COPY chal /home/user/

FROM gcr.io/kctf-docker/challenge@sha256:6dd60da626bc43bf3175d9d7436006db5acc7710d5d1b7006ab53e718fe51e40
Expand Down
5 changes: 5 additions & 0 deletions vrp/level1/challenge/nsjail.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ mount: [
dst: "/etc/resolv.conf"
is_bind: true
},
{
src: "/etc/node-os-release"
dst: "/etc/node-os-release"
is_bind: true
},
{
src: "/dev/null"
dst: "/dev/null"
Expand Down

0 comments on commit 38d5b15

Please sign in to comment.