chore: update git (#150)
* chore: rename image name * chore: add git v2.25.0 * chore: enhance Dockerfile
This commit is contained in:
parent
7c0de2ddec
commit
c00fd7be83
5 changed files with 36 additions and 19 deletions
|
@ -1,7 +1,2 @@
|
|||
.*
|
||||
|
||||
!.eslintrc.json
|
||||
!.prettierrc.json
|
||||
|
||||
coverage
|
||||
node_modules
|
||||
*
|
||||
|
|
|
@ -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
28
Dockerfile
Normal 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" ]
|
5
Makefile
5
Makefile
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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" ]
|
Loading…
Reference in a new issue