diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7fc3bc9..57cb76d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,8 +4,13 @@ COPY --from=registry.hub.docker.com/library/golang:1.21 \ /usr/local/go \ /usr/local/go -ENV GOPATH=/home/hypnos/go -ENV PATH $GOPATH/bin:$PATH +ENV GOPATH=/go +ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH + +RUN mkdir -p \ + "$GOPATH/src" \ + "$GOPATH/bin" \ + && chmod -R 1777 "$GOPATH" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b006d35..a6618ce 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,10 +6,14 @@ "runArgs": [ "--privileged" ], - "extensions": [ - "ms-azuretools.vscode-docker", - "golang.go", - "streetsidesoftware.code-spell-checker" - ], + "customizations": { + "vscode": { + "extensions": [ + "ms-azuretools.vscode-docker", + "golang.go", + "streetsidesoftware.code-spell-checker" + ], + } + }, "postStartCommand": "nohup bash -c 'sudo dockerd-entrypoint.sh dockerd --group hypnos &' > ~/.dockerd.log 2>&1" } diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c482356..447a2a2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,10 +3,10 @@ name: test on: pull_request: paths: - - "**/*.go" + - "**.go" push: paths: - - "**/*.go" + - "**.go" jobs: test: diff --git a/ports/dev-dart/Dockerfile b/ports/dev-dart/Dockerfile new file mode 100644 index 0000000..24db1c1 --- /dev/null +++ b/ports/dev-dart/Dockerfile @@ -0,0 +1,71 @@ +ARG BASE +FROM ${BASE} + +RUN apt-get update \ + && apt-get install --yes --no-install-recommends \ + apt-utils \ + openssh-client \ + gnupg2 \ + dirmngr \ + iproute2 \ + procps \ + lsof \ + htop \ + net-tools \ + psmisc \ + curl \ + wget \ + rsync \ + ca-certificates \ + unzip \ + zip \ + git \ + git-lfs \ + nano \ + vim \ + less \ + jq \ + lsb-release \ + apt-transport-https \ + dialog \ + libc6 \ + libgcc1 \ + libkrb5-3 \ + libgssapi-krb5-2 \ + libicu[0-9][0-9] \ + libstdc++6 \ + zlib1g \ + locales \ + sudo \ + ncdu \ + man-db \ + strace \ + manpages \ + manpages-dev \ + init-system-helpers \ + bash-completion \ + zsh \ + python3 \ + pip \ + && apt-get clean --yes \ + && rm -rf /var/lib/apt/lists/* \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen + +RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ + && apt-get install --yes --no-install-recommends \ + nodejs \ + && apt-get clean --yes \ + && rm -rf /var/lib/apt/lists/* + + + +ARG USERNAME=hypnos +ARG USER_UID=${UID:-1000} +ARG USER_GID=${GID:-${USER_UID}} +RUN groupadd "${USERNAME}" --gid ${USER_GID} \ + && useradd --create-home "${USERNAME}" --shell /bin/bash --uid "${USER_UID}" --gid "${USER_GID}" \ + && echo "${USERNAME}:${USERNAME}" | chpasswd \ + && echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/${USERNAME}" + +WORKDIR /home/${USERNAME} diff --git a/ports/dev-dart/port.yaml b/ports/dev-dart/port.yaml new file mode 100644 index 0000000..ac3b9e6 --- /dev/null +++ b/ports/dev-dart/port.yaml @@ -0,0 +1,9 @@ +name: ghcr.io/lesomnus/dev-dart + +images: + - tags: + - ( printf "%d.%d" $.Major $.Minor ) + - ( printf "%d" $.Major ) + from: + name: registry.hub.docker.com/library/dart + tags: ( tags | semverFinalized | semverN 1 2 1 )