Skip to content

Commit

Permalink
chore: update git (#150)
Browse files Browse the repository at this point in the history
* chore: rename image name
* chore: add git v2.25.0
* chore: enhance Dockerfile
  • Loading branch information
peaceiris authored Jan 25, 2020
1 parent 7c0de2d commit c00fd7b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 19 deletions.
7 changes: 1 addition & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
.*

!.eslintrc.json
!.prettierrc.json

coverage
node_modules
*
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
11 changes: 0 additions & 11 deletions __tests__/Dockerfile

This file was deleted.

0 comments on commit c00fd7b

Please sign in to comment.