Skip to content
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

add devcontainer #21

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM mcr.microsoft.com/devcontainers/go:1.3.0-1.23-bookworm
RUN apt-get update && apt-get upgrade -y
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}"
}

28 changes: 28 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3.8'
services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../..:/workspaces:cached
network_mode: service:minio
command: sleep infinity
environment:
AWS_ACCESS_KEY_ID: ocfltest
AWS_SECRET_ACCESS_KEY: ocfltest
AWS_REGION: us-east-1
OCFL_TEST_S3: "http://minio:9000"

minio:
image: quay.io/minio/minio:RELEASE.2024-09-22T00-33-43Z
restart: unless-stopped
volumes:
- minio-data:/data
command: server /data
environment:
MINIO_ROOT_USER: ocfltest
MINIO_ROOT_PASSWORD: ocfltest

volumes:
minio-data:
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion cmd/ocfl/internal/testutil/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TempS3Location(t *testing.T, prefix string) string {
func S3Client(ctx context.Context) (*s3.Client, error) {
endpoint := os.Getenv(envS3Endpoint)
if endpoint == "" {
return nil, errors.New("S3 not enabled in thest test environment: $OCFL_TEST_S3ß not set.")
return nil, errors.New("S3 not enabled in thest test environment: $OCFL_TEST_S3 not set")
}
cnf, err := config.LoadDefaultConfig(ctx)
if err != nil {
Expand Down