chore: update git (#150)

* chore: rename image name
* chore: add git v2.25.0
* chore: enhance Dockerfile
This commit is contained in:
Shohei Ueda 2020-01-25 11:56:09 +09:00 committed by GitHub
parent 7c0de2ddec
commit c00fd7be83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 19 deletions

View file

@ -1,7 +1,2 @@
.*
!.eslintrc.json
!.prettierrc.json
coverage
node_modules
*

View file

@ -7,3 +7,7 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile]
indent_size = 4
indent_style = tab

28
Dockerfile Normal file
View file

@ -0,0 +1,28 @@
ARG NODE_VERSION
FROM node:${NODE_VERSION}-buster-slim
SHELL ["/bin/bash", "-l", "-c"]
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev autoconf \
ca-certificates \
wget && \
rm -rf /var/lib/apt/lists/*
WORKDIR /git
ENV GIT_VERSION="2.25.0"
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
tar -zxf "./v${GIT_VERSION}.tar.gz" && \
rm "./v${GIT_VERSION}.tar.gz" && \
cd "./git-${GIT_VERSION}" && \
make configure && \
./configure --prefix=/usr && \
make all && \
make install
WORKDIR /repo
CMD [ "bash" ]

View file

@ -1,7 +1,8 @@
cmd := "bash"
msg := ""
IMAGE_NAME := actions-hugo-dev:latest
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --file ./__tests__/Dockerfile
IMAGE_NAME := actions_hugo_dev:latest
NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/etc/gitconfig $(IMAGE_NAME)

View file

@ -1,11 +0,0 @@
FROM node:12-slim
WORKDIR /repo
RUN apt-get update && \
apt-get -y install --no-install-recommends \
git \
bash && \
rm -rf /var/lib/apt/lists/*
CMD [ "bash" ]