小编deb*_*bug的帖子

Docker 未运行 Ubuntu 20.04

我已经在一台新机器上安装了 docker 并使用了以下教程https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04

\n

我有以下输出。

\n
~/code \xc2\xbb sudo systemctl status docker                                                                               ben@bagley\n\xe2\x97\x8f docker.service - Docker Application Container Engine\n     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)\n     Active: active (running) since Tue 2021-08-10 10:36:50 BST; 3s ago\nTriggeredBy: \xe2\x97\x8f docker.socket\n       Docs: https://docs.docker.com\n   Main PID: 19143 (dockerd)\n      Tasks: 20\n     Memory: 28.3M\n     CGroup: /system.slice/docker.service\n             \xe2\x94\x94\xe2\x94\x8019143 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock\n
Run Code Online (Sandbox Code Playgroud)\n

然而,当我跑步时

\n
curl -s "https://laravel.build/example-app?with=mysql,redis" | bash\n
Run Code Online (Sandbox Code Playgroud)\n

我得到以下信息:Docker is not running.

\n

ubuntu docker

9
推荐指数
1
解决办法
2万
查看次数

如何在 next-auth 中将数据添加到客户端 API?

我目前正在使用凭据提供程序使用 next-auth 进行授权,我有会话正在运行并且用户可以登录等。但是,在会话中我需要使用客户端 API、用户、名字、姓氏传递一些数据,用户名和电子邮件。

默认情况下,客户端 API 传递名称、电子邮件和图像,但是,我如何更改它以添加上述数据,这是我到目前为止所拥有的。

索引.js

import { useState, useEffect  } from 'react';
import { getSession } from 'next-auth/client'
import { useRouter } from 'next/router';
import Link from 'next/link';
import Head from 'next/head';
import Sidebar from '../components/Sidebar';

export default function Dashboard({ user}) {
  return (
    <div>
      <Head>
        <title>Dashboard</title>
      </Head>

      <Sidebar />

      <section className="content dashboard-content">
        <h1>Dashboard</h1>

        <h3>Welcome to Ellis development {user.firstname }</h3>
      </section>
    </div>
  )
}

export async function getServerSideProps(ctx) {
  const session = await getSession(ctx);
  
  if (!session) { …
Run Code Online (Sandbox Code Playgroud)

javascript node.js next.js next-auth

6
推荐指数
1
解决办法
1万
查看次数

Vue动态背景图片内联组件

我正在用 Vue 构建一个需要动态背景的横幅,但是,它似乎不起作用。不知道我做错了什么。我已经尝试了其他一些方法,如果我做一个类似的图像标签,它会起作用

<img :src="require(`@/assets/images/${backgroundImage}`)" />
Run Code Online (Sandbox Code Playgroud)

但显然这需要是一个内嵌的背景图像。

代码:

成分

<template>
  <div
    class="w-full h-64 bg-auto bg-no-repeat bg-center lg:bg-cover relative"
    :style="{ backgroundImage: url(require('@/assets/images/' + backgroundImage))}"
  >
    <div class="w-full h-full flex flex-col justify-center items-center text-white px-6">
      <div class="hero-text rounded text-center py-8 px-12">
        <p class="text-base lg:text-md uppercase font-medium">{{ smallLeadingText }}</p>
        <h1 class="text-xl md:text-3xl lg:text-5xl uppercase font-bold">{{ mainText }}</h1>
        <p class="text-base lg:text-md">{{ subText }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "PageHero",
  props: {
    backgroundImage: String,
    smallLeadingText: {
      type: String,
      required: false
    }, …
Run Code Online (Sandbox Code Playgroud)

javascript css vue.js vue-component

3
推荐指数
1
解决办法
1733
查看次数

标签 统计

javascript ×2

css ×1

docker ×1

next-auth ×1

next.js ×1

node.js ×1

ubuntu ×1

vue-component ×1

vue.js ×1