Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dev container and new job
- Loading branch information
Showing
4 changed files
with
95 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM golang:1.13-alpine | ||
|
||
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version. | ||
ARG VARIANT=hugo_extended | ||
# VERSION can be either 'latest' or a specific version number | ||
ARG VERSION=latest | ||
|
||
RUN apk add --update --no-cache ca-certificates openssl git curl && \ | ||
case ${VERSION} in \ | ||
latest) \ | ||
export VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') ;;\ | ||
esac && \ | ||
echo ${VERSION} && \ | ||
wget -O ${VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${VERSION}/${VARIANT}_${VERSION}_Linux-64bit.tar.gz && \ | ||
tar xf ${VERSION}.tar.gz && \ | ||
mv hugo* /usr/bin/hugo && \ | ||
go get github.com/yaegashi/muslstack && \ | ||
muslstack -s 0x800000 /usr/bin/hugo | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine-3.12 | ||
# Required for hugo_extended | ||
RUN apk add --update --no-cache libc6-compat | ||
COPY --from=0 /usr/bin/hugo /usr/bin | ||
EXPOSE 1313 | ||
WORKDIR /src | ||
CMD ["/usr/bin/hugo server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "Hugo Resume", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update VARIANT to pick hugo variant. | ||
// Example variants: hugo, hugo_extended | ||
// Rebuild the container if it already exists to update. | ||
"VARIANT": "hugo", | ||
// Update VERSION to pick a specific hugo version. | ||
// Example versions: latest, 0.73.0, 0,71.1 | ||
// Rebuild the container if it already exists to update. | ||
"VERSION": "latest" | ||
} | ||
}, | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.profiles.linux": { | ||
"zsh (login)": { | ||
"path": "zsh" | ||
} | ||
} | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"bungcip.better-toml", | ||
"davidanson.vscode-markdownlint" | ||
], | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ | ||
1313 | ||
], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a", | ||
// Uncomment to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. | ||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], | ||
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust | ||
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | ||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
"postCreateCommand": "git submodule update --init" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters