Giter Site home page Giter Site logo

gonivinck's People

Contributors

nivin-studio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gonivinck's Issues

提供消息中间件的环境

消息中间件的使用

您好,请问这个仓库可以提供消息中间件的使用吗?比如zookeeper kafka或者rabbitmq,或者欢迎提pr吗?我也可以做这个部分的内容。

golang 容器命令报错

stat: cannot statx '/usr/bin/screen': Operation not permitted
dpkg: error processing package screen (--configure):
installed screen package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.31-13+deb11u2) ...
Errors were encountered while processing:
screen
E: Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: Service 'golang' failed to build : The command '/bin/sh -c sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends curl zip unzip git vim screen' returned a non-zero code: 100

m1 macbook pro 使用您提供的docker环境,安装到mysql5.7的时候报错。

starwu@m1mac  gonivinck   main ±  docker-compose up
Building mysql
[+] Building 2.4s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.5s
=> => transferring dockerfile: 36B 0.0s
=> [internal] load .dockerignore 0.7s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/mysql:5.7 1.5s

[internal] load metadata for docker.io/library/mysql:5.7:


failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:afc453de0d675083ac00d0538521f8a9a67d1cce180d70fab9925ebcc87a0eba: not found
ERROR: Service 'mysql' failed to build : Build failed

希望提供 .devcontainer 开发环境

如题,希望一起提供 .devcontainer 开发环境,在vscode中开发使用.

贴一个我正在用的参照,使用 vscode的 remote-devcontainer 生成的默认配置修改后使用:

// devcontainer.json

 // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/go-postgres
{	
	"name": "Go",
	"dockerComposeFile": "docker-compose.yml",
	"service": "app",
	"workspaceFolder": "/workspace",

	// Configure tool-specific properties.
	"customizations": {
		// Configure properties specific to VS Code.
		"vscode": {
			// Set *default* container specific settings.json values on container create.
			"settings": { 
				"go.toolsManagement.checkForUpdates": "local",
				"go.useLanguageServer": true,
				"go.gopath": "/go",
				"go.goroot": "/usr/local/go"
			},
			
			// Add the IDs of extensions you want installed when the container is created.
			"extensions": [
				"golang.Go",
				"plex.vscode-protolint",
				"peterj.proto",
				"xiaoxin-technology.goctl"
			]
		}
	},

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [5432],

	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": "go version",

	// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode"
}
 
// docker-compose.yml

version: '3.8'

volumes:
  mysql-data:

services:
  app:
    build: 
      context: .
      dockerfile: Dockerfile
      args:
        # [Choice] Go version 1, 1.18, 1.17
        # Append -bullseye or -buster to pin to an OS version.
        # Use -bullseye variants on local arm64/Apple Silicon.
        VARIANT: 1-bullseye
        # Options
        NODE_VERSION: "lts/*"
    env_file:
        # Ensure that the variables in .env match the same variables in devcontainer.json
        - .env

    # Security Opt and cap_add allow for C++ based debuggers to work. 
    # See `runArgs`: https://github.com/Microsoft/vscode-docs/blob/main/docs/remote/devcontainerjson-reference.md
#     security_opt:
#       - seccomp:unconfined
#     cap_add:
#       - SYS_PTRACE

    volumes:
      - ..:/workspace:cached
      
    # Overrides default command so things don't shut down after the process ends.
    command: sleep infinity

    # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
    network_mode: service:db

    # Uncomment the next line to use a non-root user for all processes.
    # user: vscode

    # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. 
    # (Adding the "ports" property to this file will not forward from a Codespace.)

  db:
    image: mariadb:latest
    restart: unless-stopped
    volumes:
      - mysql-data:/var/lib/mysql
    env_file:
      # Ensure that the variables in .env match the same variables in devcontainer.json
      - .env



  redis:
    image: redis

  etcd:
    image: bitnami/etcd

# Dockerfile

# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.18, 1.17, 1-bullseye, 1.18-bullseye, 1.17-bullseye, 1-buster, 1.18-buster, 1.17-buster
ARG VARIANT=1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

USER vscode
RUN go env -w GOPROXY=https://goproxy.cn

RUN GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest
RUN goctl env check -i -f --verbose  
RUN chmod +x /go/bin/protoc

USER root

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
#     && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment the next lines to use go get to install anything else you need
# USER vscode
# RUN go get -x <your-dependency-or-tool>
# USER root

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

windows 下wsl2中docker mysql5.7错误

--initialize specified but the data directory has files in it. Aborting.
错误日志中就是这样的错误。docker-compose文件没有修改。请问应该怎么解决这个问题。

运行docker-compose up -d报错

电脑系统:mac
Shell工具:iTerm2
报错信息:
➜ docker-compose up -d
[+] Building 51.1s (6/10)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/golang:1.17 15.3s
=> [1/7] FROM docker.io/library/golang:1.17@sha256:c72fa9afc50b3303e8044cf28fb358b48032a548e1825819420fd40155a131cb 0.0s
=> CACHED [2/7] RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && s 0.0s
=> ERROR [3/7] RUN GOPROXY=https://goproxy.cn/,direct go install github.com/tal-tech/go-zero/tools/goctl@cli 35.8s

[3/7] RUN GOPROXY=https://goproxy.cn/,direct go install github.com/tal-tech/go-zero/tools/goctl@cli:
#6 0.594 go: downloading github.com/tal-tech/go-zero/tools/goctl v1.2.5-0.20211230073016-b98d46bfd629
#6 1.031 go: downloading github.com/tal-tech/go-zero v1.2.5-0.20211230073016-b98d46bfd629
#6 1.441 go: downloading github.com/tal-tech/go-zero v1.2.5-0.20211230062155-e4ab51857606
#6 1.441 go: downloading github.com/logrusorgru/aurora v2.0.3+incompatible
#6 1.449 go: downloading github.com/urfave/cli v1.22.5
#6 1.787 go: downloading github.com/iancoleman/strcase v0.2.0
#6 1.793 go: downloading github.com/go-sql-driver/mysql v1.6.0
#6 1.950 go: downloading go.opentelemetry.io/otel/trace v1.1.0
#6 2.017 go: downloading github.com/fatih/structtag v1.2.0
#6 2.082 go: downloading github.com/zeromicro/antlr v0.0.1
#6 2.124 go: downloading github.com/lib/pq v1.10.3
#6 2.323 go: downloading github.com/emicklei/proto v1.9.1
#6 2.338 go: downloading go.uber.org/automaxprocs v1.4.0
#6 2.344 go: downloading go.opentelemetry.io/otel v1.1.0
#6 2.459 go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
#6 2.506 go: downloading gopkg.in/yaml.v2 v2.4.0
#6 2.507 go: downloading github.com/zeromicro/ddl-parser v0.0.0-20210712021150-63520aca7348
#6 2.528 go: downloading github.com/spaolacci/murmur3 v1.1.0
#6 2.719 go: downloading github.com/russross/blackfriday/v2 v2.0.1
#6 2.830 go: downloading github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521184019-c5ad59b459ec
#6 2.962 go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
#6 34.81 go build github.com/zeromicro/ddl-parser/gen: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed


failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c GOPROXY=https://goproxy.cn/,direct go install github.com/tal-tech/go-zero/tools/goctl@cli]: exit code: 1

编译环境失败

`#6 5.132 go: downloading github.com/russross/blackfriday/v2 v2.0.1
#6 5.263 go: downloading github.com/spaolacci/murmur3 v1.1.0
#6 5.357 go: downloading github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521184019-c5ad59b459ec
#6 5.489 go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
#6 37.55 go build github.com/zeromicro/ddl-parser/gen: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

executor failed running [/bin/sh -c GOPROXY=https://goproxy.cn/,direct go install github.com/tal-tech/go-zero/tools/goctl@cli]: exit code: 1
ERROR: Service 'golang' failed to build`

goctl下载失败

构建过程:
=> [3/7] RUN GOPROXY=https://goproxy.io/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest 33.8s
=> => # go: downloading go.uber.org/automaxprocs v1.4.0
=> => # go: downloading gopkg.in/yaml.v2 v2.4.0
=> => # go: downloading github.com/zeromicro/ddl-parser v0.0.0-20210712021150-63520aca7348
=> => # go: downloading github.com/spaolacci/murmur3 v1.1.0
=> => # go: downloading github.com/shurcooL/sanitized_anchor_name v1.0.0
=> => # go: downloading github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210521184019-c5ad59b459ec

总是卡在这里。
下载时间很长,进而导致docker崩溃,

redis-manange启动之后, 无法通过ip:2000的方式登录

redis-manange启动之后, 无法通过ip:2000的方式登录。
并且通过docker-compose logs -tf --tail=100 redis-manage
redis-manage_1 | 2022-11-27T13:44:39.832174818Z [Sun Nov 27 21:44:39 2022] 192.168.33.1:56422 Accepted
redis-manage_1 | 2022-11-27T13:44:39.832556366Z [Sun Nov 27 21:44:39 2022] 192.168.33.1:56423 Accepted
redis-manage_1 | 2022-11-27T13:44:39.836023829Z [Sun Nov 27 21:44:39 2022] 192.168.33.1:56422 [401]: GET /
redis-manage_1 | 2022-11-27T13:44:39.836254430Z [Sun Nov 27 21:44:39 2022] 192.168.33.1:56422 Closing
redis-manage_1 | 2022-11-27T13:45:25.842368530Z [Sun Nov 27 21:45:25 2022] 172.19.0.1:35722 Accepted
redis-manage_1 | 2022-11-27T13:45:25.843832423Z [Sun Nov 27 21:45:25 2022] 172.19.0.1:35722 [401]: GET /
redis-manage_1 | 2022-11-27T13:45:25.843843300Z [Sun Nov 27 21:45:25 2022] 172.19.0.1:35722 Closing
redis-manage_1 | 2022-11-27T13:45:29.735465533Z [Sun Nov 27 21:45:29 2022] 172.19.0.1:35762 Accepted
redis-manage_1 | 2022-11-27T13:45:29.737446536Z [Sun Nov 27 21:45:29 2022] 172.19.0.1:35762 [401]: GET /
redis-manage_1 | 2022-11-27T13:45:29.737464891Z [Sun Nov 27 21:45:29 2022] 172.19.0.1:35762 C

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.