summaryrefslogtreecommitdiff
path: root/docker/Dockerfile
blob: 0f1be4b836e93901b1dec1f5c2319f6f937f3e77 (plain)
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
# Build a docker image from latest YaCy sources

# Base image : latest stable Debian 
FROM debian:latest

# Install needed packages
RUN apt-get update && apt-get install -yq \
	default-jdk \
	ant \
	git
	
# set current working dir
WORKDIR /opt

# clone main YaCy git repository (we need to clone git repository to generate correct version when building from source)
RUN git clone https://github.com/yacy/yacy_search_server.git

# trace content of source directory
RUN ls -la /opt/yacy_search_server

# set current working dir
WORKDIR /opt/yacy_search_server
	
# Compile with ant
RUN ant compile

# Set initial admin password : "docker"
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init

# make some cleaning to reduce image size
RUN rm -rf .git && apt-get clean

# Expose port 8090
EXPOSE 8090

# Set data volume : can be used to persist yacy data and configuration
VOLUME ["/opt/yacy_search_server/DATA"]

# Start yacy ind debug mode (-d) to display console logs and to wait for yacy process
CMD sh /opt/yacy_search_server/startYACY.sh -d