This repository was archived by the owner on Sep 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +27
-16
lines changed
Expand file tree Collapse file tree 4 files changed +27
-16
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,7 @@ FROM ghcr.io/cse-labs/k3d:latest
55
66# some images require specific values
77ARG USERNAME=vscode
8+
9+ # log the docker build start / complete events
10+ RUN echo "$(date) docker build start" >> /home/$USERNAME/status && \
11+ echo "$(date) docker build complete" >> /home/$USERNAME/status
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- echo " on-create start" >> ~ /status
3+ # this runs as part of pre-build
4+
5+ echo " $( date) on-create start" >> ~ /status
46
57# clone repos
68git clone https://github.com/retaildevcrews/ngsa-app /workspaces/ngsa-app
79git clone https://github.com/microsoft/webvalidate /workspaces/webvalidate
810
11+ # restore the repos
12+ dotnet restore /workspaces/webvalidate/src/webvalidate.sln
13+ dotnet restore /workspaces/ngsa-app/Ngsa.App.csproj
14+
915# copy grafana.db to /grafana
1016sudo cp deploy/grafanadata/grafana.db /grafana
1117sudo chown -R 472:0 /grafana
1218
19+ # make sure everything is up to date
20+ sudo apt-get update
21+ sudo apt-get upgrade -y
22+ sudo apt-get autoremove -y
23+ sudo apt-get clean -y
24+
1325# create local registry
1426docker network create k3d
1527k3d registry create registry.localhost --port 5500
@@ -20,4 +32,4 @@ docker pull mcr.microsoft.com/dotnet/sdk:5.0-alpine
2032docker pull mcr.microsoft.com/dotnet/aspnet:5.0-alpine
2133docker pull mcr.microsoft.com/dotnet/sdk:5.0
2234
23- echo " on-create complete" >> ~ /status
35+ echo " $( date ) on-create complete" >> ~ /status
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- echo " post-create start " >> ~ /status
3+ # this runs at Codespace creation - not part of pre-build
44
5- # this runs in background after UI is available
5+ echo " $( date ) post-create start " >> ~ /status
66
7- # (optional) upgrade packages
8- # sudo apt-get update
9- # sudo apt-get upgrade -y
10- # sudo apt-get autoremove -y
11- # sudo apt-get clean -y
7+ # update the repos
8+ git pull -C /workspaces/ngsa-app
9+ git pull -C /workspaces/webvalidate
1210
13- dotnet restore /workspaces/webvalidate/src/webvalidate.sln
14- dotnet restore /workspaces/ngsa-app/Ngsa.App.csproj
15-
16- echo " post-create complete" >> ~ /status
11+ echo " $( date) post-create complete" >> ~ /status
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- echo " post-start start " >> ~ /status
3+ # this runs each time the container starts
44
5- # this runs in background each time the container starts
5+ echo " $( date ) post-start start " >> ~ /status
66
77# update the base docker images
88docker pull mcr.microsoft.com/dotnet/sdk:5.0-alpine
99docker pull mcr.microsoft.com/dotnet/aspnet:5.0-alpine
1010docker pull mcr.microsoft.com/dotnet/sdk:5.0
1111
12- echo " post-start complete" >> ~ /status
12+ echo " $( date ) post-start complete" >> ~ /status
You can’t perform that action at this time.
0 commit comments