summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-04-18 11:06:32 +0100
committerMatthew Lemon <y@yulqen.org>2024-04-18 11:06:32 +0100
commit20560419614e22fbb58567cdb0b88b54caf679f4 (patch)
tree163df44f07907d865b363db3bc198287ebd3d25f /Dockerfile
parent435742cede199e3c85b5e2eb5a42ccbee4906a05 (diff)
Adds code from ded-go-core - no database
D2S test app code removed (nginx error). Adds all go code from `ded-go-core` using the basic Gov.UK UI for a test page for DED.
Diffstat (limited to '')
-rw-r--r--Dockerfile37
1 files changed, 12 insertions, 25 deletions
diff --git a/Dockerfile b/Dockerfile
index b000137..fbae58b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,25 +1,12 @@
-FROM registry.access.redhat.com/ubi9/nginx-122:1-17
-
-# Switch to Root to update
-USER 0
-
-# Uninstalling BIND to avoid CVE-2023-2828, CVE-2023-2828 & CVE-2023-2828
-# NGINX shouldn't need BIND, unless it's specfically doing DNS related things (famous last words)
-RUN rpm -e bind-license-9.16.23-11.el9.noarch bind-libs-9.16.23-11.el9.x86_64 bind-utils-9.16.23-11.el9.x86_64
-
-# Switch back the default user
-USER 1001
-
-# COPY application sources
-COPY nginx-conf/nginx.conf "${NGINX_CONF_PATH}"
-COPY nginx-conf/nginx-default-cfg/*.conf "${NGINX_DEFAULT_CONF_PATH}"
-COPY nginx-conf/nginx-cfg/*.conf "${NGINX_CONFIGURATION_PATH}"
-COPY nginx-conf/*.html .
-COPY nginx-conf/logging.conf /opt/app-root/etc/nginx.d/logging.conf
-COPY govuk-frontend/assets /opt/app-root/src/assets
-COPY govuk-frontend/govuk-frontend-4.0.0.min.css /opt/app-root/src/govuk-frontend-4.0.0.min.css
-COPY govuk-frontend/govuk-frontend-4.0.0.min.js /opt/app-root/src/govuk-frontend-4.0.0.min.js
-COPY govuk-frontend/govuk-frontend-ie8-4.0.0.min.css /opt/app-root/src/govuk-frontend-ie8-4.0.0.min.css
-
-# Run script uses standard ways to run the application
-CMD nginx -g "daemon off;"
+FROM golang:alpine
+
+WORKDIR /app
+
+RUN apk add --update npm
+RUN npm i sass govuk-frontend --save
+COPY go.mod ./
+RUN go mod download && go mod verify
+COPY . .
+RUN go build -v -o /usr/local/bin/app ./cmd/web
+CMD ["app"]
+EXPOSE 4000