This commit is contained in:
Christian Schmidt 2024-05-10 20:06:52 +00:00 committed by GitHub
commit a37d4ec096
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 12 deletions

View File

@ -1,20 +1,20 @@
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
FROM mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye
# Install Rails
# RUN gem install rails webdrivers
ARG NODE_VERSION="20"
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libpam-dev
# [Optional] Uncomment this line to install additional gems.
RUN gem install foreman
# [Optional] Uncomment this line to install global node packages.
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && corepack enable" 2>&1
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
WORKDIR /mastodon
ENV PATH=${PATH}:/mastodon/bin
RUN su vscode -c "git config --global --add safe.directory /mastodon"

View File

@ -2,7 +2,7 @@
"name": "Mastodon on GitHub Codespaces",
"dockerComposeFile": "../docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"workspaceFolder": "/mastodon",
"features": {
"ghcr.io/devcontainers/features/sshd:1": {}
@ -36,7 +36,6 @@
"LIBRE_TRANSLATE_ENDPOINT": ""
},
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": ".devcontainer/post-create.sh",
"waitFor": "postCreateCommand",

View File

@ -2,7 +2,7 @@
"name": "Mastodon on local machine",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"workspaceFolder": "/mastodon",
"features": {
"ghcr.io/devcontainers/features/sshd:1": {}
@ -27,7 +27,6 @@
"onAutoForward": "silent"
},
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": ".devcontainer/post-create.sh",
"waitFor": "postCreateCommand",

View File

@ -6,7 +6,7 @@ services:
context: .
dockerfile: Dockerfile
volumes:
- ../..:/workspaces:cached
- ..:/mastodon:cached
environment:
RAILS_ENV: development
NODE_ENV: development

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -e # Fail the whole script on first error
# Fail the whole script on first error
set -ev
# Fetch Ruby gem dependencies
bundle config path 'vendor/bundle'