Cosmos-Server/dockerfile.arm64

40 lines
775 B
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-05-27 17:11:33 +00:00
RUN apt-get update && apt-get install -y ca-certificates openssl
2023-03-25 20:15:00 +00:00
WORKDIR /app
2023-05-27 17:11:33 +00:00
# install go 1.20.2
RUN apt-get install -y wget curl
RUN wget https://golang.org/dl/go1.20.2.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin
# install nodejs 18.16.0
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . .
RUN ls
RUN npm run client-build
2023-05-27 17:19:48 +00:00
RUN chmod +x build.sh
2023-05-27 17:11:33 +00:00
RUN ./build.sh
WORKDIR /app/build
2023-03-10 20:59:56 +00:00
CMD ["./cosmos"]