Skip to content

Commit aeff741

Browse files
committed
image
1 parent 4e69ae5 commit aeff741

2 files changed

Lines changed: 33 additions & 3 deletions

File tree

Taskfile.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 3
2+
3+
vars:
4+
5+
NAME: ghcr.io/sciabarracom/openserverless-devcontainer
6+
7+
TAG:
8+
sh: git tag --sort=-creatordate | head -n 1 || "latest"
9+
10+
tasks:
11+
12+
show: "echo {{.NAME}}:{{.TAG}}"
13+
14+
image-tag:
15+
- git tag -d "$(git tag)" || true
16+
- git tag "0.1.0-incubating.$(date +%y%m%d%H%M)"
17+
- task: show
18+
19+
build:
20+
- docker build -t "{{.NAME}}:{{.TAG}}" . --load
21+
22+
build-and-tag:
23+
- task: image-tag
24+
- task: build

start-ssh.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
sudo mkdir -p /run/sshd
33
sudo ssh-keygen -A
44
mkdir -p ~/.ssh
5-
chmod 600 ~/.ssh/authorized_keys
5+
PORT=${SSH_PORT:-2222} d
66
if test -n "$AUTHORIZED_KEY"
77
then echo "$AUTHORIZED_KEY" >>~/.ssh/authorized_keys
8+
chmod 600 ~/.ssh/authorized_keys
89
fi
9-
ln -sf /workspace ~/workspace
10-
sudo chown -R 1000:1000 /workspace
10+
if test -d /workspace
11+
then
12+
ln -sf /workspace ~/workspace
13+
sudo chown -R 1000:1000 /workspace
14+
fi
15+
echo Starting ssh in port $PORT
16+
sudo /usr/sbin/sshd -p $PORT -D

0 commit comments

Comments
 (0)