From 2fdf52013f7c21ef2f958526ad427960cbce455f Mon Sep 17 00:00:00 2001 From: bytedream Date: Sun, 6 Feb 2022 23:16:45 +0100 Subject: [PATCH] Added Dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..677d948 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:latest as build + +WORKDIR /theadversary + +COPY backend/ . + +RUN apt update && \ + apt -y install wget gcc + +RUN wget -O- https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -C /usr/local/ -xzf - && \ + ln -s /usr/local/go/bin/go /usr/bin/ + +RUN go build . + +FROM ubuntu:latest + +WORKDIR /theadversary + +COPY frontend/ ./frontend/ +COPY database.sqlite3 . +COPY .env . + +COPY --from=build /theadversary/TheAdversary . + +EXPOSE 8080 + +CMD ["./TheAdversary"]