mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-21 03:34:50 +00:00
add some hacky experiments for inotify event parsing
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
FROM golang:1.9-stretch
|
||||
|
||||
RUN useradd -ms /bin/bash myuser
|
||||
RUN apt-get update && apt-get -y install cron sudo
|
||||
COPY docker/etc/cron.d /etc/cron.d
|
||||
COPY docker/scripts /scripts
|
||||
|
||||
RUN useradd -ms /bin/bash myuser && \
|
||||
adduser myuser sudo && \
|
||||
echo 'myuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER myuser
|
||||
|
||||
|
||||
WORKDIR /go/src/github.com/dominicbreuker
|
||||
|
||||
|
||||
|
||||
1
docker/etc/cron.d/myjob
Normal file
1
docker/etc/cron.d/myjob
Normal file
@@ -0,0 +1 @@
|
||||
* * * * * root echo 'this is some text' >> /tmp/myjob.log
|
||||
1
docker/etc/cron.d/print
Normal file
1
docker/etc/cron.d/print
Normal file
@@ -0,0 +1 @@
|
||||
* * * * * root python /scripts/print_stuff.py >> /tmp/print.log
|
||||
9
docker/scripts/print_stuff.py
Normal file
9
docker/scripts/print_stuff.py
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
user = "myusername"
|
||||
password = "thepw"
|
||||
|
||||
for i in range(100):
|
||||
print("a"*i)
|
||||
|
||||
print("done")
|
||||
Reference in New Issue
Block a user