Refactor Dockerfile and devcontainer configuration; add FFmpeg and Node.js installation

This commit is contained in:
cedricve
2025-04-13 07:46:06 +00:00
parent ac814dc357
commit 8877157db5
3 changed files with 41 additions and 16 deletions

View File

@@ -1,2 +1,26 @@
FROM kerberos/devcontainer:5da0fe7
LABEL AUTHOR=Kerberos.io
FROM mcr.microsoft.com/devcontainers/go:1.24-bookworm
# Install node environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install ffmpeg
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
libavcodec-extra \
libavutil-dev \
libavformat-dev \
libavfilter-dev \
libavdevice-dev \
libswscale-dev \
libswresample-dev \
&& rm -rf /var/lib/apt/lists/*
USER vscode
# Install go swagger
RUN go install github.com/swaggo/swag/cmd/swag@latest

View File

@@ -1,21 +1,20 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "A Dockerfile containing FFmpeg, OpenCV, Go and Yarn",
"context": "..",
"dockerFile": "./Dockerfile",
"forwardPorts": [
3000,
80
],
"postCreateCommand": "cd ui && yarn install && yarn build && cd ../machinery && go mod download",
"name": "go:1.24-bookworm",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-azuretools.vscode-docker",
"GitHub.copilot",
"golang.go",
"ms-vscode.vscode-typescript-next"
"ms-azuretools.vscode-docker",
"mongodb.mongodb-vscode"
]
}
}
},
"forwardPorts": [
3000,
8080
],
"postCreateCommand": "cd ui && yarn install && yarn build && cd ../machinery && go mod download"
}

4
.vscode/launch.json vendored
View File

@@ -12,7 +12,9 @@
"program": "${workspaceFolder}/machinery/main.go",
"args": [
"-action",
"run"
"run",
"-port",
"8080"
],
"envFile": "${workspaceFolder}/machinery/.env",
"buildFlags": "--tags dynamic",