Skip to content

Update samples #108

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

Merged
merged 5 commits into from
Mar 22, 2022
Merged

Update samples #108

merged 5 commits into from
Mar 22, 2022

Conversation

benja-M-1
Copy link
Member

@benja-M-1 benja-M-1 commented Mar 21, 2022

This PR upgrades the api.version label to >= 0.2.0.
It also adds the Docker Desktop theme into the React example:
Screenshot 2022-03-21 at 12 30 40

@@ -1,4 +1,4 @@
FROM node:14.17-alpine3.13 AS client-builder
FROM node:17.7-alpine3.14 AS client-builder
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade to latest node version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this Dockerfile was created automatically as a result of docker extension init.

I think we should update the boilerplate as well: https://github.com/docker/desktop-extensions-cli/blob/main/cmd/desktopcmds/initialize/initdata/Dockerfile#L14

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make react-script work on node 17

Comment on lines +9 to +12
<DockerMuiThemeProvider>
<CssBaseline />
<App />
</DockerMuiThemeProvider>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show how to use the theme.

@@ -1,2 +1,36 @@
extension: ## Build service image to be deployed as a desktop extension
docker build --tag=desktop-react-extension .
IMAGE?=desktop-react-extension
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes made in this makefile are backported to the cli in this PR https://github.com/docker/desktop-extensions-cli/pull/59

@@ -3,7 +3,7 @@ FROM scratch
LABEL org.opencontainers.image.title="SwimmingWhale" \
org.opencontainers.image.description="A sample plugin that just displays a whale swimming." \
org.opencontainers.image.vendor="Docker Inc." \
com.docker.desktop.extension.api.version="1.0.0-beta.1"
com.docker.desktop.extension.api.version=">= 0.2.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gtardif This extension was one of the first that was developed. Should we target >= 0.1.0 instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, this is minor, but for the docs, i'd prefer to not confuse users and stick with >= 0.2.0 consistenty with other samples

@gtardif gtardif merged commit ba30c03 into docker:main Mar 22, 2022
@benja-M-1 benja-M-1 deleted the chores/update-sdk branch March 22, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants