Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Dockerfile to support securing container supply chain #4303

Merged
merged 3 commits into from
May 27, 2022
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Resolves [#4301](https://github.com/microsoft/BotFramework-WebChat/issues/4301). Updated `Dockerfile` to support secure container supply chain, by [@compulim](https://github.com/compulim) in PR [#4303](https://github.com/microsoft/BotFramework-WebChat/pull/4303)

## [4.15.2] - 2022-05-09

### Breaking changes
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions packages/test/harness/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# NPM@7 is buggy with its "postinstall" script, going back to Node.js 14 with NPM@6 for now.
FROM node:14-alpine
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18-alpine

FROM $BASE_IMAGE

RUN apk update && \
apk upgrade && \
Expand Down
6 changes: 5 additions & 1 deletion playground.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM node:alpine
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18-alpine

FROM $BASE_IMAGE

RUN apk update && \
apk upgrade && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This container is for simplifying CI when using Azure Pipelines

# Aggregates all code into a single Docker image for export
FROM node:12
FROM $BASE_IMAGE

# Copy the bot code to /var/bot/
ADD bot/ /var/build/bot/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This is the container for running the demo under Azure Web App
FROM node:12
FROM $BASE_IMAGE

# Expose both port 80 and 2222 (SSH for Azure Web App)
EXPOSE 80 2222
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This container is for simplifying CI when using Azure Pipelines

# The first builder image will build HTML and JavaScript code out of the create-react-app project
FROM node:12 AS builder-react
FROM $BASE_IMAGE AS builder-react
WORKDIR /var/build/react/

# Copy the web app code to /var/build/react/
Expand All @@ -15,7 +19,7 @@ RUN npm ci
RUN npm run build

# The second builder image will aggregate all code into a single Docker image for export
FROM node:12
FROM $BASE_IMAGE

# Copy the bot code to /var/bot/
ADD bot/ /var/build/bot/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This is the container for running the demo under Azure Web App
FROM node:12 AS builder-web
compulim marked this conversation as resolved.
Show resolved Hide resolved
FROM $BASE_IMAGE

# Expose both port 80 and 2222 (SSH for Azure Web App)
EXPOSE 80 2222
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This container is for simplifying CI when using Azure Pipelines
FROM node:12
FROM $BASE_IMAGE

# Copy the bot code to /var/bot/
ADD bot/ /var/build/bot/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This is the container for running the demo under Azure Web App
FROM node:12
FROM $BASE_IMAGE

# Expose both port 80 and 2222 (SSH for Azure Web App)
EXPOSE 80 2222
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This container is for simplifying CI when using Azure Pipelines
FROM node:12
FROM $BASE_IMAGE

# Copy the bot code to /var/bot/
ADD bot/ /var/build/bot/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This is the container for running the demo under Azure Web App
FROM node:12
FROM $BASE_IMAGE

# Expose both port 80 and 2222 (SSH for Azure Web App)
EXPOSE 80 2222
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This container is for simplifying CI when using Azure Pipelines

# The first builder image will build HTML and JavaScript code out of the create-react-app project
FROM node:12 AS builder-react
FROM $BASE_IMAGE AS builder-react
WORKDIR /var/build/react/

# Copy the web app code to /var/build/react/
Expand All @@ -15,7 +19,7 @@ RUN npm ci
RUN npm run build

# The second builder image will aggregate all code into a single Docker image for export
FROM node:12
FROM $BASE_IMAGE

# Copy the bot code to /var/bot/
ADD bot/ /var/build/bot/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18

# This is the container for running the demo under Azure Web App
FROM node:12 AS builder-web
FROM $BASE_IMAGE

# Expose both port 80 and 2222 (SSH for Azure Web App)
EXPOSE 80 2222
Expand Down
6 changes: 5 additions & 1 deletion testharness.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM node:alpine
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18-alpine

FROM $BASE_IMAGE

RUN apk update && \
apk upgrade && \
Expand Down
6 changes: 5 additions & 1 deletion testharness2.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM node:alpine
# Setting to a different base image to secure your container supply chain.
ARG REGISTRY=docker.io
ARG BASE_IMAGE=$REGISTRY/node:18-alpine

FROM $BASE_IMAGE

RUN apk update && \
apk upgrade && \
Expand Down