Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Composer/packages/server/.composer
extensions/.build-cache.json
extensions/**/lib
extensions/**/dist

# ignore git folder
**/.git
32 changes: 10 additions & 22 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,25 @@ on:

jobs:
build:
timeout-minutes: 60
timeout-minutes: 120
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Build
uses: docker/build-push-action@v2
with:
push: false
context: .
file: Dockerfile
tags: botframework-composer
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
load: true
run: docker build --tag botframework-composer --file Dockerfile .

- name: Health check
run: |
docker run -d --rm -p "5000:5000" botframework-composer
sleep 10
docker run -d -p 5000:5000 --name bfc botframework-composer
sleep 15
docker ps -a
docker logs bfc
curl -Is http://localhost:5000 | grep -q "200 OK"
shell: bash

- name: Clean up
if: always()
run: docker stop $(docker ps -a -q)
run: docker rm -f $(docker ps -a -q)
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,19 @@ export const variableScopesResolver = (): CompletionItem[] => {
documentation:
'turn is associated with a single turn. You can also think of this as the bot handling a single message from the user. Properties in the turn scope are discarded at the end of the turn.',
},
{
label: 'this.',
kind: CompletionItemKind.Enum,
insertText: 'this.',
documentation:
"this is associated with the active action's properties. It is helpful for input actions that last beyond a single turn of the conversation. Two properties already on the scope are this.value and this.turnCount.",
},
{
label: 'settings.',
kind: CompletionItemKind.Enum,
insertText: 'settings.',
documentation:
'settings is associated with any information that is made available to the bot via the platform specific settings configuration system, for example if you are developing your bot using C#, these settings will appear in the appsettings.json file.',
},
];
};
65 changes: 15 additions & 50 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
# before doing yarn install due to yarn workspace symlinking.
#
################

FROM node:12-buster as build

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-focal as base
RUN apt update \
&& apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt install -y nodejs \
&& npm install -g yarn

FROM base as build
ARG YARN_ARGS

WORKDIR /src/Composer
Expand All @@ -21,7 +26,7 @@ ENV NODE_ENV "production"
ENV COMPOSER_BUILTIN_EXTENSIONS_DIR "/src/extensions"
RUN yarn build:prod $YARN_ARGS

FROM node:12-buster as composerbasic
FROM base as composerbasic
ARG YARN_ARGS

WORKDIR /app/Composer
Expand All @@ -32,56 +37,16 @@ COPY --from=build /src/extensions ../extensions

ENV NODE_ENV "production"
RUN yarn --production --frozen-lockfile --force $YARN_ARGS && yarn cache clean
WORKDIR /app/Composer

FROM composerbasic

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libssl1.1 \
libstdc++6 \
zlib1g \
&& rm -rf /var/lib/apt/lists/*

# Install .Net Core SDK
ENV \
# Unset the value from the base image
ASPNETCORE_URLS= \
# Disable the invariant mode (set in base image)
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
# Enable correct mode for dotnet watch (only mode supported in a container)
DOTNET_USE_POLLING_FILE_WATCHER=true \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
# Skip extraction of XML docs - generally not useful within an image/container - helps performance
NUGET_XMLDOC_MODE=skip \
# PowerShell telemetry for docker image usage
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Ubuntu-18.04

# Add dependencies for disabling invariant mode (set in base image)
RUN wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3_amd64.deb
RUN dpkg -i libicu60_60.2-3ubuntu3_amd64.deb

# Install .NET Core SDK 3.1
ENV DOTNET_SDK_VERSION 3.1.403
FROM base
ENV NODE_ENV "production"

RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \
&& dotnet_sha512='0a0319ee8e9042bf04b6e83211c2d6e44e40e604bff0a133ba0d246d08bff76ebd88918ab5e10e6f7f0d2b504ddeb65c0108c6539bc4fbc4f09e4af3937e88ea' \
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
&& rm dotnet.tar.gz
WORKDIR /app/Composer
COPY --from=composerbasic /app ..

# Enable detection of running in a container
ENV DOTNET_RUNNING_IN_CONTAINER=true \
# Set the invariant mode since icu_libs isn't included (see https://github.com/dotnet/announcements/issues/20)
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true

ENV COMPOSER_BUILTIN_EXTENSIONS_DIR "/app/extensions"
ENV COMPOSER_REMOTE_EXTENSIONS_DIR "/app/remote-extensions"
ENV COMPOSER_EXTENSION_DATA "/app/extensions.json"
CMD ["yarn","start:server"]

CMD ["yarn","start:server"]