From 34269131c7642752a27a853602ca6489cff71392 Mon Sep 17 00:00:00 2001 From: Yann Stepienik Date: Sat, 27 May 2023 18:41:32 +0100 Subject: [PATCH] [release] v0.5.12-unstable --- dockerfile | 38 ++++++++++++++++++-------------------- dockerfile.arm64 | 38 ++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/dockerfile b/dockerfile index 845a34d..69cc486 100644 --- a/dockerfile +++ b/dockerfile @@ -6,20 +6,21 @@ EXPOSE 443 80 VOLUME /config -RUN apt-get update && apt-get install -y ca-certificates openssl - WORKDIR /app -# 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 -RUN rm go1.20.2.linux-amd64.tar.gz -# install nodejs 18.16.0 -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - -RUN apt-get install -y nodejs +RUN apt-get update && apt-get install -y ca-certificates openssl && \ + apt-get install -y wget curl && \ + apt-get install -y nodejs && \ + apt-get install -y wget curl && \ + 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 ./ @@ -30,16 +31,13 @@ COPY package-lock.json ./ RUN npm install COPY . . -RUN ls -RUN npm run client-build -RUN chmod +x build.sh -RUN ./build.sh - -# clean up -RUN apt-get remove -y wget curl nodejs -RUN apt-get autoremove -y -RUN rm -rf node_modules -RUN rm -rf /usr/local/go +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 diff --git a/dockerfile.arm64 b/dockerfile.arm64 index 63506d5..00168f9 100644 --- a/dockerfile.arm64 +++ b/dockerfile.arm64 @@ -6,20 +6,21 @@ EXPOSE 443 80 VOLUME /config -RUN apt-get update && apt-get install -y ca-certificates openssl - WORKDIR /app -# install go 1.20.2 -RUN apt-get install -y wget curl -RUN wget https://golang.org/dl/go1.20.2.linux-arm64.tar.gz -RUN tar -C /usr/local -xzf go1.20.2.linux-arm64.tar.gz ENV PATH=$PATH:/usr/local/go/bin -RUN rm go1.20.2.linux-arm64.tar.gz -# install nodejs 18.16.0 -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - -RUN apt-get install -y nodejs +RUN apt-get update && apt-get install -y ca-certificates openssl && \ + apt-get install -y wget curl && \ + apt-get install -y nodejs && \ + apt-get install -y wget curl && \ + 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 COPY go.mod ./ COPY go.sum ./ @@ -30,16 +31,13 @@ COPY package-lock.json ./ RUN npm install COPY . . -RUN ls -RUN npm run client-build -RUN chmod +x build.sh -RUN ./build.sh - -# clean up -RUN apt-get remove -y wget curl nodejs -RUN apt-get autoremove -y -RUN rm -rf node_modules -RUN rm -rf /usr/local/go +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