forked from bakape/shamichan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
42 lines (36 loc) · 1005 Bytes
/
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
FROM golang
EXPOSE 8000
RUN mkdir -p /meguca/images
ENTRYPOINT ["./scripts/with_postgres.sh"]
CMD ["./meguca", "-a", ":8000"]
WORKDIR /meguca
# Install OS dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y \
build-essential \
pkg-config \
libpth-dev \
libavcodec-dev libavutil-dev libavformat-dev libswscale-dev \
libwebp-dev \
libopencv-dev \
libgeoip-dev \
git lsb-release wget curl netcat postgresql-client
RUN apt-get dist-upgrade -y
# Install Node.js
RUN wget -q -O- https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
# Cache dependency downloads, if possible
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY package.json .
COPY package-lock.json .
RUN npm install
# Copy and build meguca
COPY . .
COPY docs/config.json .
RUN sed -i 's/localhost:5432/postgres:5432/' config.json
RUN sed -i 's/"reverse_proxied": false/"reverse_proxied": true/' config.json
RUN sed -i 's/127\.0\.0\.1:8000/:8000/' config.json
RUN make