Skip to content

Commit ecd7f36

Browse files
New: [AEA-6285] - Adds Data Extract Repo Image (#67)
## Summary - ✨ New Feature ### Details Adds Data Extract Repo Image with Java 17
1 parent f73ed5b commit ecd7f36

File tree

8 files changed

+83
-2
lines changed

8 files changed

+83
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ guard-%:
1111
fi
1212

1313
.PHONY: install install-python install-node install-hooks build-base-image build-node-24-image build-node-24-python-3-10-image build-node-24-python-3-12-image build-node-24-python-3-13-image build-node-24-python-3-14-image \
14-
build-eps-storage-terraform-image build-fhir-facade-image build-node-24-python-3-14-golang-1-24-image build-node-24-python-3-14-java-24-image \
14+
build-eps-storage-terraform-image build-eps-data-extract-image build-fhir-facade-image build-node-24-python-3-14-golang-1-24-image build-node-24-python-3-14-java-24-image \
1515
build-regression-tests-image build-all build-image build-githubactions-image scan-image scan-image-json shell-image lint test lint-githubactions lint-githubaction-scripts clean
1616
install: install-python install-node install-hooks
1717

@@ -45,6 +45,9 @@ build-node-24-python-3-14-image:
4545
build-eps-storage-terraform-image:
4646
CONTAINER_NAME=eps_storage_terraform BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image
4747

48+
build-eps-data-extract-image:
49+
CONTAINER_NAME=eps_data_extract BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image
50+
4851
build-fhir-facade-image:
4952
CONTAINER_NAME=fhir_facade_api BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image
5053

@@ -58,7 +61,7 @@ build-regression-tests-image:
5861
CONTAINER_NAME=regression_tests BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image
5962

6063
build-all: build-base-image build-node-24-image build-node-24-python-3-10-image build-node-24-python-3-12-image build-node-24-python-3-13-image build-node-24-python-3-14-image \
61-
build-eps-storage-terraform-image build-fhir-facade-image build-node-24-python-3-14-golang-1-24-image build-node-24-python-3-14-java-24-image \
64+
build-eps-storage-terraform-image build-eps-data-extract-image build-fhir-facade-image build-node-24-python-3-14-golang-1-24-image build-node-24-python-3-14-java-24-image \
6265
build-regression-tests-image
6366

6467
build-image: guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
java temurin-17.0.18+8
2+
maven 3.9.13
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
ARG BASE_VERSION_TAG=latest
2+
ARG BASE_IMAGE=ghcr.io/nhsdigital/eps-devcontainers/node_24_python_3_14:${BASE_VERSION_TAG}
3+
4+
FROM ${BASE_IMAGE}
5+
6+
ARG SCRIPTS_DIR=/usr/local/share/eps
7+
ARG CONTAINER_NAME
8+
ARG MULTI_ARCH_TAG
9+
ARG BASE_VERSION_TAG
10+
ARG IMAGE_TAG
11+
ARG TARGETARCH
12+
13+
ENV SCRIPTS_DIR=${SCRIPTS_DIR}
14+
ENV CONTAINER_NAME=${CONTAINER_NAME}
15+
ENV MULTI_ARCH_TAG=${MULTI_ARCH_TAG}
16+
ENV BASE_VERSION_TAG=${BASE_VERSION_TAG}
17+
ENV IMAGE_TAG=${IMAGE_TAG}
18+
ENV TARGETARCH=${TARGETARCH}
19+
20+
LABEL org.opencontainers.image.description="EPS devcontainer ${CONTAINER_NAME}:${IMAGE_TAG}"
21+
LABEL org.opencontainers.image.version=${IMAGE_TAG}
22+
LABEL org.opencontainers.image.base.name=${BASE_IMAGE}
23+
LABEL org.opencontainers.image.containerName=${CONTAINER_NAME}
24+
25+
USER root
26+
COPY --chmod=755 scripts ${SCRIPTS_DIR}/${CONTAINER_NAME}
27+
WORKDIR ${SCRIPTS_DIR}/${CONTAINER_NAME}
28+
RUN ./root_install.sh
29+
30+
USER vscode
31+
32+
WORKDIR ${SCRIPTS_DIR}/${CONTAINER_NAME}
33+
COPY .tool-versions /tmp/.tool-versions
34+
RUN cat /tmp/.tool-versions >> /home/vscode/.tool-versions
35+
36+
RUN ./vscode_install.sh
37+
38+
# Switch back to root to install the devcontainer CLI globally
39+
USER root
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "EPS Devcontainer for Data Extract",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"build": {
7+
"dockerfile": "Dockerfile",
8+
"args": {
9+
"CONTAINER_NAME": "eps_devcontainer_${localEnv:CONTAINER_NAME}",
10+
"MULTI_ARCH_TAG": "${localEnv:MULTI_ARCH_TAG}",
11+
"BASE_VERSION_TAG": "${localEnv:BASE_VERSION_TAG}",
12+
"IMAGE_TAG": "${localEnv:IMAGE_TAG}"
13+
},
14+
"context": "."
15+
},
16+
"features": {}
17+
}
18+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
export DEBIAN_FRONTEND=noninteractive
4+
5+
# clean up
6+
apt-get clean
7+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
asdf plugin add java
5+
asdf plugin add maven
6+
7+
asdf install
8+
9+
# install cfn-lint
10+
pip install --user cfn-lint
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vulnerabilities:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignorefile: "src/projects/eps-data-extract/.trivyignore_combined.yaml"

0 commit comments

Comments
 (0)