Skip to content

Instantly share code, notes, and snippets.

@yoomlam
Created July 8, 2023 00:06
Show Gist options
  • Save yoomlam/af99b7dadd11acb33c2e9ac2483bfc88 to your computer and use it in GitHub Desktop.
Save yoomlam/af99b7dadd11acb33c2e9ac2483bfc88 to your computer and use it in GitHub Desktop.
Dockerfile for building VRO
# 2023-04-04
# To build VRO code within a container:
# docker build -t vro-builder -f buildSrc/docker/Dockerfile-build .
# docker run -ti --rm --env GITHUB_ACCESS_TOKEN vro-builder
# At the /app prompt, run:
# ./gradlew build -x test -x check
FROM eclipse-temurin:17-jdk-alpine
# hadolint ignore=DL3018
RUN apk update \
&& apk --no-cache add expat=2.5.0-r0 curl github-cli shellcheck py3-pip \
&& rm -rf /var/cache/apk/*
ENV HADOLINT_VERSION='2.10.0'
RUN wget -O /usr/local/bin/hadolint \
"https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64" \
&& chmod +x /usr/local/bin/hadolint
WORKDIR /abd-vro
RUN adduser --disabled-password tron \
&& chown -R tron /abd-vro
USER tron
RUN git clone https://github.com/department-of-veterans-affairs/abd-vro.git . \
&& hadolint --version \
&& pip install -r service-python/requirements.txt \
&& ./gradlew --version
ENTRYPOINT ["sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment