This repository was archived by the owner on Sep 22, 2024. It is now read-only.
File tree 4 files changed +27
-16
lines changed
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
5
5
6
6
# some images require specific values
7
7
ARG 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 1
1
#! /bin/bash
2
2
3
- echo " on-create start" >> ~ /status
3
+ # this runs as part of pre-build
4
+
5
+ echo " $( date) on-create start" >> ~ /status
4
6
5
7
# clone repos
6
8
git clone https://github.com/retaildevcrews/ngsa-app /workspaces/ngsa-app
7
9
git clone https://github.com/microsoft/webvalidate /workspaces/webvalidate
8
10
11
+ # restore the repos
12
+ dotnet restore /workspaces/webvalidate/src/webvalidate.sln
13
+ dotnet restore /workspaces/ngsa-app/Ngsa.App.csproj
14
+
9
15
# copy grafana.db to /grafana
10
16
sudo cp deploy/grafanadata/grafana.db /grafana
11
17
sudo chown -R 472:0 /grafana
12
18
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
+
13
25
# create local registry
14
26
docker network create k3d
15
27
k3d registry create registry.localhost --port 5500
@@ -20,4 +32,4 @@ docker pull mcr.microsoft.com/dotnet/sdk:5.0-alpine
20
32
docker pull mcr.microsoft.com/dotnet/aspnet:5.0-alpine
21
33
docker pull mcr.microsoft.com/dotnet/sdk:5.0
22
34
23
- echo " on-create complete" >> ~ /status
35
+ echo " $( date ) on-create complete" >> ~ /status
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- echo " post-create start " >> ~ /status
3
+ # this runs at Codespace creation - not part of pre-build
4
4
5
- # this runs in background after UI is available
5
+ echo " $( date ) post-create start " >> ~ /status
6
6
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
12
10
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 1
1
#! /bin/bash
2
2
3
- echo " post-start start " >> ~ /status
3
+ # this runs each time the container starts
4
4
5
- # this runs in background each time the container starts
5
+ echo " $( date ) post-start start " >> ~ /status
6
6
7
7
# update the base docker images
8
8
docker pull mcr.microsoft.com/dotnet/sdk:5.0-alpine
9
9
docker pull mcr.microsoft.com/dotnet/aspnet:5.0-alpine
10
10
docker pull mcr.microsoft.com/dotnet/sdk:5.0
11
11
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