From 6642965bea735df03d89a8b51b0d4a542e9bd0c4 Mon Sep 17 00:00:00 2001 From: "R. Richard" Date: Thu, 5 Sep 2019 18:20:09 +0200 Subject: [PATCH] Dockerize frontend for multistage building --- .dockerignore | 4 ++++ Dockerfile | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..18395c2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.editorconfig +.gitignore +Dockerfile +README.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e6908dc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM avatao/debian:buster + +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |\ + sudo apt-key add - &&\ + echo "deb https://dl.yarnpkg.com/debian/ stable main" |\ + sudo tee /etc/apt/sources.list.d/yarn.list &&\ + apt-get update &&\ + apt-get install -y --no-install-recommends nodejs yarn &&\ + rm -rf /var/lib/apt/lists/* + +WORKDIR /srv + +COPY . /srv +RUN yarn install --frozen-lockfile && yarn build --no-progress + +CMD yarn start