Skip to content

Commit

Permalink
Merge pull request #1 from bcgov/dev-env-setup
Browse files Browse the repository at this point in the history
Dev env setup
  • Loading branch information
WadeBarnes authored Jul 5, 2024
2 parents 7a5025a + b91269d commit c396f95
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Install dependencies
RUN apt-get update && \
apt-get install -y wget tar && \
apt-get clean

# Set environment variables
ENV S2I_VERSION=source-to-image-v1.4.0-d3544c7e-linux-arm64.tar.gz

# Download and install S2I
RUN wget https://github.com/openshift/source-to-image/releases/download/v1.4.0/${S2I_VERSION} -O /tmp/${S2I_VERSION} && \
tar -xzf /tmp/${S2I_VERSION} -C /usr/local/bin && \
rm /tmp/${S2I_VERSION}

# Verify installation
RUN s2i version

# Set the default command
CMD ["bash"]
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "JASPER",
"build": {
"dockerfile": "Dockerfile",
"context": "."
},
"features": {
"ghcr.io/devcontainers/features/dotnet:2": {},
"ghcr.io/devcontainers/features/aws-cli:1": {},
"ghcr.io/devcontainers/features/terraform:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"postCreateCommand": "./docker/manage build",
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"rangav.vscode-thunder-client",
"vue.volar",
"christian-kohler.path-intellisense",
"ms-dotnettools.csdevkit",
"ms-dotnettools.csharp",
"ms-dotnettools.vscode-dotnet-runtime",
"amazonwebservices.aws-toolkit-vscode"
],
"settings": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.formatOnSave": true
}
}
},
"remoteUser": "root"
}
2 changes: 1 addition & 1 deletion docker/manage
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ build-web() {
${S2I_EXE} build \
--copy \
'../web' \
'quay.io/centos7/nodejs-12-centos7' \
'quay.io/centos7/nodejs-12-centos7:master' \
'scv-web-artifacts'
echo -e "===================================================================================================="

Expand Down

0 comments on commit c396f95

Please sign in to comment.