专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

civisanalytics/civis-services-shiny Docker 镜像 - 轩辕镜像

civis-services-shiny
civisanalytics/civis-services-shiny
自动构建
See GitHub description.
2 收藏0 次下载
⚠️ 线上容器拉取慢、不稳定?拉镜像别再赌运气
镜像简介版本下载
⚠️ 线上容器拉取慢、不稳定?拉镜像别再赌运气

Civis Services Shiny

![CircleCI]([***]

This repository provides the following components:

  • A Docker Image to support R Shiny applications on Civis Platform
  • A demo R Shiny app that's readily deployable on Civis Platform

Quickstart Using the Demo Application

To get a sense of what a Shiny app looks like on Civis Platform:

  • Log on to Civis Platform.
  • From the top navigation bar, click "Publish".
  • Under "Services", click "Shiny Demo".

These steps create a new Civis Platform service configured for a Shiny demo app pointing to this GitHub repository. The app is now ready to be deployed. Please follow these instructions for service deployment.

If you would like to start making the demo app your own by making code changes, you may fork this GitHub repository where the demo app's source code is in the directory app/.

If you would like to host and use your own Docker image, Dockerfile and entrypoint.sh from this GitHub repository define the civisanalytics/civis-services-shiny image that you may modify and then host on your own DockerHub account.

Building and Deploying Your Shiny Application

If you would like to build your own Shiny application from scratch and deploy it on Civis Platform, here are the requirements:

  1. Your Shiny application must have its source code hosted on a GitHub repository. The Civis Platform user account that's going to deploy this Shiny app must have access to this GitHub repo.

  2. Your app must have either an app.R file or server.R and ui.R files. Further file organization tips are included below.

  3. Once your app code is on a GitHub repo, either create a new service on Civis Platform by following this page, or launch a Shiny template service from Civis Platform's top navigation bar -> Publish -> Services -> Shiny Demo. Specify or adjust the GitHub repo URL as well as the Git tag (or branch, or Git commit hash).

    a. If your code is at a directory in your repo (rather than directly at the root level of your repo), specify the directory path that points to where the app code is located.

  4. For the Docker image, the name is civisanalytics/civis-services-shiny, and the tag is one of those listed on DockerHub. Note that the specific Docker image name and tag you've chosen determines which R version your app is going to run on.

For more information on deploying Shiny Apps in Civis Platform, please see Helpful Tips for Shiny App Deployments.

Organization Tips

As applications grow in size, a modular structure improves maintainability. While very short applications may fit nicely in a single app.R, it is recommended to use a seperate server.R and ui.R for larger projects. For large projects, it is also recommended to keep the code in server.R and ui.R simple by writing functions and modules in seperate R files which are sourced at the top of the server.R and ui.R files.

Recommended Directory Structure

Basic

Top Level
│    README.md
│    Dockerfile
│    app.R
│    global.R

Advanced / Customized

Top Level
│    README.md
│    server.R
│    ui.R
│    global.R
|    install.R
│    DESCRIPTION
│    <extra_scripts>.R
│    <modules>.R
└─── www
     │    <custom_javascript>.js
     │    <custom_css>.css
     │    <custom_img>.gif

File names inside <> will change from project to project
File Structure Elements
  • README.md
    • A description of the repository and any details needed to understand and/or run the application.
  • app.R
    • A single file that contains server.R and ui.R.
    • Not needed if server.R and ui.R are present.
    • See: app format docs.
  • server.R
    • Logic for server. The final function must be the server function.
    • See: two-file docs.
  • ui.R
    • Logic for UI elements. The final function must be the UI object.
    • See: two-file docs.
  • global.R
    • Global logic that is run when app is started.
    • Use this file to share state across ui.R and server.R. If only server needs to look at the state, prefer isolating code in server.R.
    • See: scoping docs
    • Dependencies may be installed in this file, or you may prefer to isolate them in a dedicated install.R file.
    • If you have a lot of dependencies to install, you may want to *** creating a custom Docker image. Pre-installing dependencies via a custom Docker image can significantly speed up start-up times for your app.
  • DESCRIPTION
    • Mainly used to add metadata to project for Showcase mode.
    • See: display-mode docs
  • <extra_scripts>.R
    • Extra logic to be used in server.R outside the main server function. That is, code that is run when the application is launched and is accessible to all server sessions.
    • Ideally, the only code in server.R should be the single server function with a call to source("extra_scripts.R", local=TRUE) at the top of the file.
  • <modules>.R
    • Modules to be shared across ui.R and server.R.
    • Typically, <modules>.R is sourced from global.R with source("modules.R") so the modules can be used in both ui.R and server.R.
    • See: modules docs
  • www
    • Folder containing optional website elements, including javascript, CSS and images.

Use Docker Image Locally

Either build the Docker image locally

bash
docker build -t civis-services-shiny .

or download the image from DockerHub

bash
docker pull civisanalytics/civis-services-shiny:latest

The latest tag (Docker's default if you don't specify a tag) will give you the most recently built version of the civis-services-shiny image. You can replace the tag latest with a version number such as 1.0 to retrieve a reproducible environment.

Testing Integration with the Civis Platform

If you would like to test the image locally follow the steps below:

  1. Build your image locally:

    docker build -t civis-services-shiny:test .
    
  2. Run the container:

    docker run --rm -p 3838:3838 -e APP_DIR=/app -e CIVIS_API_KEY civis-services-shiny:test
    

    This mounts the app folder in the Docker container under /app, where the entrypoint expects to find it. You will need to modify the run command if your application is at a different path. It also makes the CIVIS_API_KEY environment variable accessible to the container, for initializing the Civis API client. However, this variable does not need to be defined in order for the app to run.

  3. Visit [***] to access your app.

    a. This is the default URL. The Shiny application logs should also tell you where the app is being served at.

    b. The app should also be available at the ip of your docker host with port 3838: <docker-host-ip>:3838. For example, when using Docker for Mac <docker-host-ip> was 127.0.0.1, so the app was available at [***].

Contributing

See CONTRIBUTING for information about contributing to this project.

If you make any changes, be sure to build a container to verify that it successfully completes:

bash
docker build -t civis-services-shiny:test .

and describe any changes in the change log.

For Maintainers

This repo has autobuild enabled. Any PR that is merged to master will be built as the latest tag on Docker Hub.

Creating a new release

Once you are ready to create a new version, go to the "releases" tab of the repository and click "Draft a new release". Github will prompt you to create a new tag, release title, and release description. The tag should use semantic versioning in the form "vX.X.X"; "major.minor.micro".

The title of the release should be the same as the tag. Include a change log in the release description.

Once the release is tagged, DockerHub will automatically build three identical containers, with labels "major", "major.minor", and "major.minor.micro".

Test branches

This repo has branch builds enabled. Branches will be built with the tag dev-<branch name> on Docker Hub.

License

BSD-3

See LICENSE.md for details.

查看更多 civis-services-shiny 相关镜像 →
rocker/shiny logo
rocker/shiny
该镜像基于rocker-org/rocker-versioned2构建,是预配置R Shiny环境的Docker镜像,包含R、Shiny Server及相关依赖,用于快速部署交互式R Shiny Web应用,简化应用开发与分发流程。
1821M+ pulls
上次更新:未知
rocker/shiny-verse logo
rocker/shiny-verse
基于Rocker的Shiny镜像,集成Tidyverse R包,采用版本稳定的基础镜像,适用于构建交互式Web应用及数据处理分析。
631M+ pulls
上次更新:未知
pecan/shiny-dbsync logo
pecan/shiny-dbsync
暂无描述
10K+ pulls
上次更新:未知
jetbrains/ide-services logo
jetbrains/ide-services
JetBrains IDE Services服务器官方镜像。
410K+ pulls
上次更新:未知
jetbrains/ide-services-helm logo
jetbrains/ide-services-helm
JetBrains IDE Services 官方 Helm 图表,用于在 Kubernetes 集群中部署和管理 IDE Services 实例。
12.6K pulls
上次更新:未知
onlyoffice/4testing-docspace-files-services logo
onlyoffice/4testing-docspace-files-services
暂无描述
100K+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
civisanalytics/civis-services-shiny
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.