forked from azukaar/Cosmos-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile.local
43 lines (32 loc) · 1.03 KB
/
dockerfile.local
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
# syntax=docker/dockerfile:1
FROM debian:11
EXPOSE 443 80
VOLUME /config
WORKDIR /app
ENV PATH=$PATH:/usr/local/go/bin
RUN apt-get update && apt-get install -y ca-certificates openssl fdisk mergerfs snapraid && \
apt-get install -y --no-install-recommends wget curl && \
apt-get install -y --no-install-recommends nodejs && \
wget https://golang.org/dl/go1.20.2.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz && \
rm go1.20.2.linux-amd64.tar.gz && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
apt-get remove -y wget curl && \
apt-get autoremove -y
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . .
RUN npm run client-build && \
chmod +x build.sh && \
./build.sh && \
rm -rf /usr/local/go \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
WORKDIR /app/build
CMD ["./cosmos"]