-
-
Notifications
You must be signed in to change notification settings - Fork 766
Created shell devcontainer for a reproducable build environment #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm | ||
|
||
RUN apt update | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
make download-tools | ||
go get | ||
yarn | ||
|
||
|
||
cd ui | ||
yarn | ||
yarn build | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | ||
{ | ||
"name": "Gotify Server Dev Container", | ||
//"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/go:1": {} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Download required toolchains with `make` and `yarn` | ||
"postCreateCommand": "bash .devcontainer/config-environment.sh", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
//root needed because server runs on port 80 and `yarn build` fails without it | ||
|
||
"remoteUser": "root" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the standard way to do this? This packages a layer of "latest" (build time) package list, can't the user just run this themselves if they want extra packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's non-standard, just different. I had changed it from the default in the devcontainer.json because I thought there might be other stuff that needed to be added on top of the base image, but that ended up not being the case. I'll change this back.