Skip to content

Commit

Permalink
Copy/move Dockerfile to top-level to bugfix push action
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Ho <jujaga@gmail.com>
  • Loading branch information
jujaga committed Oct 31, 2023
1 parent 47e1941 commit 2483bd4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.DS_Store
.gradle
.nyc_output
.scannerwork
build
coverage
dist
node_modules

# local env files
local.*
local-*.*
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.iml
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM docker.io/bcgovimages/alpine-node-libreoffice:20.9.0

ARG APP_ROOT=/opt/app-root/src
ENV APP_PORT=8080 \
NO_UPDATE_NOTIFIER=true
WORKDIR ${APP_ROOT}

# Install Zip
RUN apk --no-cache add zip && \
rm -rf /var/cache/apk/*

# Install BCSans Font
RUN wget https://www2.gov.bc.ca/assets/gov/british-columbians-our-governments/services-policies-for-government/policies-procedures-standards/web-content-development-guides/corporate-identity-assets/bcsansfont_print.zip?forcedownload=true -O bcsans.zip && \
unzip bcsans.zip && \
rm bcsans.zip && \
mkdir -p /usr/share/fonts/bcsans && \
install -m 644 ./BcSansFont_Print/*.ttf /usr/share/fonts/bcsans/ && \
rm -rf ./BcSansFont_Print && \
fc-cache -f

# NPM Permission Fix (already present in base image)

# Install Application
COPY app ${APP_ROOT}
RUN chown -R 1001:0 ${APP_ROOT}
USER 1001
RUN npm ci --omit=dev

EXPOSE ${APP_PORT}
CMD ["npm", "run", "start"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ bcgovpubcode.yml - BCGov public code asset tracking
CODE-OF-CONDUCT.md - Code of Conduct
COMPLIANCE.yaml - BCGov PIA/STRA compliance status
CONTRIBUTING.md - Contributing Guidelines
Dockerfile - Dockerfile Image definition
Jenkinsfile - Top-level Pipeline
Jenkinsfile.cicd - Pull-Request Pipeline
LICENSE - License
Expand Down

0 comments on commit 2483bd4

Please sign in to comment.