forked from opencog/opencog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (51 loc) · 1.75 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# Primary OpenCog Dockerfile
#
# Usage: docker build -t $USER/opencog .
# docker run --name="my_cog" -p 17001:17001 -p 18001:18001 -it $USER/opencog
# docker exec -it my_cog bash
#
FROM ubuntu:14.04
MAINTAINER David Hart "[email protected]"
MAINTAINER Linas Vepstas "[email protected]"
RUN apt-get update ; apt-get -y upgrade ; apt-get -y autoclean
RUN apt-get -y install software-properties-common wget rlwrap \
telnet netcat-openbsd git gdb python2.7-dbg
# Use the ocpkg tool to install repositories and dependencies.
ADD https://raw.githubusercontent.com/opencog/ocpkg/master/ocpkg \
/tmp/octool
RUN chmod 755 /tmp/octool && /tmp/octool -rdpcalv
# Copy the .gdbinit file so we can debug the CogServer
COPY scripts/.gdbinit ~/.gdbinit
# Environment Variables
## Set Locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Create and switch user. The user is privileged, with no password required.
RUN adduser --disabled-password --gecos "OpenCog Developer" opencog
RUN adduser opencog sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER opencog
RUN mkdir /home/opencog/src
WORKDIR /home/opencog/src
# Change line below on rebuild. Will use cache up to this line.
ENV LAST_SOFTWARE_UPDATE 2015-02-18
# Now, OpenCog itself.
RUN git clone https://github.com/opencog/opencog
RUN (cd opencog; mkdir build; cd build; cmake ..; make -j4)
# Defaults
## cogserver shell ports
EXPOSE 17001 18001
## REST api
EXPOSE 5000
## ports on which OpenCog's unity3d game communicates with opencog_embodiment
### port from opencog's embodiment code
EXPOSE 16313
### ports from the unity3d game code
EXPOSE 16315 16312
## Default postgresql port
EXPOSE 5432
# Docker defaults
CMD bash