-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 824 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 824 Bytes
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
FROM ubuntu:14.04
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
postgresql-9.3
RUN curl http://pwnadventure.com/PwnAdventure3Server.tar.gz -o /tmp/PwnAdventure3Server.tar.gz \
&& mkdir -p /opt/pwn-adventure3 \
&& tar -x -z -v -f /tmp/PwnAdventure3Server.tar.gz --strip-components=1 -C /opt/pwn-adventure3 \
&& rm /tmp/PwnAdventure3Server.tar.gz
USER postgres
WORKDIR /opt/pwn-adventure3/MasterServer
RUN /etc/init.d/postgresql start \
&& createdb -w --owner=postgres master \
&& psql master -f initdb.sql
COPY ./entrypoint.sh .
USER root
RUN chmod +x entrypoint.sh
RUN chmod +x MasterServer
RUN chmod -R ugo+rw /opt/pwn-adventure3/MasterServer
USER postgres
EXPOSE 3333
CMD ["./entrypoint.sh"]