You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2026/09/12 07:15:09 UTC
(openserverless-devcontainer) branch 0.9.0 updated (bfa4215 -> dbab8aa)
This is an automated email from the ASF dual-hosted git repository.
sciabarracom pushed a change to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-devcontainer.git
from bfa4215 license fix
new 6011f72 fix imagetag
new dbab8aa cleanup devcontainer
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/image.yml | 7 ++++---
Dockerfile | 21 ++++++++++-----------
Taskfile.yml | 13 ++++++++++++-
start.sh | 19 ++++---------------
4 files changed, 30 insertions(+), 30 deletions(-)
(openserverless-devcontainer) 02/02: cleanup devcontainer
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sciabarracom pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-devcontainer.git
commit dbab8aab00182c57f79bf8fa7beee150cfef3c98
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Sat Sep 12 09:14:06 2026 +0200
cleanup devcontainer
---
Dockerfile | 21 ++++++++++-----------
Taskfile.yml | 13 ++++++++++++-
start.sh | 19 ++++---------------
3 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 8f7d7a5..9b19f7d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,11 @@
# specific language governing permissions and limitations
# under the License.
+FROM golang:1.27 AS builder
+RUN go install github.com/apache/openserverless-cli/cmd/ops@0.9.0
+
FROM node:22
+COPY --from=builder /go/bin/ops /usr/local/bin/ops
ARG DEVCONTAINER_IMAGE_DEFAULT=docker.io/apache/openserverless-devcontainer
ARG DEVCONTAINER_TAG_DEFAULT=latest
@@ -25,7 +29,8 @@ RUN \
curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt update && \
apt install -y less sudo jq nano python-is-python3 python3-virtualenv \
- locales postgresql-client-16 openssh-server tini supervisor
+ locales postgresql-client-16 openssh-server tini supervisor && \
+ rm -rf /var/lib/apt/lists/*
# setup env
RUN \
@@ -34,21 +39,15 @@ RUN \
locale-gen en_US.UTF-8 && \
update-locale ANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8
-RUN userdel node ; rm -Rvf /home/node
-ENV HOME=/home
-ENV OPS_HOME=/home
-ENV OPS_BRANCH=main
+ENV HOME=/home/openserverless
ENV PATH=/home/.local/bin:/usr/local/bin:/usr/bin:/bin
-RUN printf "OPS_HOME=$OPS_HOME\nOPS_BRANCH=$OPS_BRANCH\nPATH=$PATH\n" >/etc/environment
-RUN \
- curl -sL https://raw.githubusercontent.com/apache/openserverless-cli/refs/heads/main/install.sh | bash ;\
- ops -t
+RUN /usr/local/bin/ops -t
ADD supervisord.ini /etc/supervisord.ini
ADD start.sh /usr/local/bin/start.sh
-RUN mkdir /home/workspace
-WORKDIR /home/workspace
+RUN mkdir -p /home/openserverless
+WORKDIR /home/openserverless
# Apache release metadata (see DISCLAIMER, LICENSE, NOTICE, WARN)
COPY DISCLAIMER LICENSE NOTICE /
diff --git a/Taskfile.yml b/Taskfile.yml
index 9822499..44ba1a8 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -165,4 +165,15 @@ tasks:
license:
desc: check license
cmds:
- - license-eye header check
\ No newline at end of file
+ - license-eye header check
+
+ test:
+ desc: testing locally
+ vars:
+ KEY:
+ sh: echo $HOME/.ssh/id_rsa.pub
+ cmds:
+ - test -e {{.KEY}} || { echo 'missing {{.KEY}}' ; exit 1; }
+ - docker rm -f devcontainer
+ - docker run -d --name devcontainer -p 2222:2222 -e SSHKEY="$(cat {{.KEY}})" {{.DEVCONTAINER_IMAGE}}:{{.TAG}}
+ - echo "access devcontainer with ssh -p 2222 openserverless@localhost, terminate with docker rm devcontainer"
\ No newline at end of file
diff --git a/start.sh b/start.sh
index 16b6eae..a8d94ed 100755
--- a/start.sh
+++ b/start.sh
@@ -16,21 +16,17 @@
# specific language governing permissions and limitations
# under the License.
+export HOME=/home/openserverless
#setup sshd
mkdir -p /run/sshd
ssh-keygen -A
-# update ops
-export HOME=/home
-export OPS_HOME=/home
-ops -update
-
# setup user workspace
if test -z "$USERID"
then USERID=1000
fi
-/usr/sbin/useradd -u "$USERID" -d $HOME -o -U -s /bin/bash devel
+/usr/sbin/useradd -u "$USERID" -d $HOME -o -U -s /bin/bash openserverless
# add ssh key
if test -n "$SSHKEY"
@@ -44,20 +40,13 @@ then
chmod 700 $HOME/.ssh
fi
-touch ~/.bashrc
+touch $HOME/.bashrc
echo ARCH="$(dpkg --print-architecture)" >>~/.bashrc
echo 'export PATH="$HOME/.local/bin:$HOME:$HOME/.ops/linux-$ARCH/bin:$PATH"' >>~/.bashrc
-if [ -n "$OPS_PASSWORD" ] && [ -n "$OPS_USER" ] && [ -n "$OPS_APIHOST" ]
-then
- cd $HOME
- echo -e "OPS_USER=$OPS_USER\nOPS_PASSWORD=$OPS_PASSWORD\nOPS_APIHOST=$OPS_APIHOST\n" >.env
- ops ide login
-fi
-
# fix permissions
chmod 0755 $HOME
-chown -Rf "$USERID" /home
+chown -Rf "$USERID" $HOME
# start supervisor
supervisord -c /etc/supervisord.ini
(openserverless-devcontainer) 01/02: fix imagetag
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sciabarracom pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-devcontainer.git
commit 6011f7264fa485780917ead9685e96445eab5533
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Fri Sep 11 21:23:37 2026 +0200
fix imagetag
---
.github/workflows/image.yml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml
index 3d0193f..5e0794f 100644
--- a/.github/workflows/image.yml
+++ b/.github/workflows/image.yml
@@ -20,7 +20,7 @@ on:
push:
tags:
- '*.*.*.*'
- branches-ignore: '*'
+ branches-ignore: '**'
workflow_dispatch:
jobs:
@@ -51,9 +51,10 @@ jobs:
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
task tag
task ci
- - name: Assign TAG from push
- run: |
echo "IMG_TAG=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
+ - name: Assign TAG from push
+ if: ${{ github.event_name == 'push' }}
+ run: echo "IMG_TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
- name: Generate .env
run: |
OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')