Cosmos-Server/dockerfile.arm64

44 lines
1 KiB
Plaintext
Raw Normal View History

2023-03-10 20:59:56 +00:00
# syntax=docker/dockerfile:1
2023-05-03 10:26:56 +00:00
FROM --platform=linux/arm64 arm64v8/debian
2023-03-10 20:59:56 +00:00
2023-03-25 20:15:00 +00:00
EXPOSE 443 80
2023-03-10 20:59:56 +00:00
VOLUME /config
2023-03-25 20:15:00 +00:00
WORKDIR /app
2023-05-27 17:11:33 +00:00
ENV PATH=$PATH:/usr/local/go/bin
2023-05-27 17:41:32 +00:00
RUN apt-get update && apt-get install -y ca-certificates openssl && \
2023-05-27 17:41:58 +00:00
apt-get install -y --no-install-recommends wget curl && \
apt-get install -y --no-install-recommends nodejs && \
2023-05-27 17:41:32 +00:00
wget https://golang.org/dl/go1.20.2.linux-arm64.tar.gz && \
tar -C /usr/local -xzf go1.20.2.linux-arm64.tar.gz && \
rm go1.20.2.linux-arm64.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
2023-05-27 17:11:33 +00:00
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . .
2023-05-27 17:41:32 +00:00
RUN npm run client-build && \
chmod +x build.sh && \
./build.sh && \
rm -rf /usr/local/go \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
2023-05-27 17:24:58 +00:00
2023-05-27 17:11:33 +00:00
WORKDIR /app/build
2023-03-10 20:59:56 +00:00
CMD ["./cosmos"]