Skip to content

Commit

Permalink
refactor docker build and docker release (#90)
Browse files Browse the repository at this point in the history
* refactor docker build and docker release

* update Changelog

* Update CHANGELOG.md

* Update Dockerfile
  • Loading branch information
Macbet committed Feb 27, 2020
1 parent 97604fd commit ba4a4db
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.editorconfig
.git
.github
.gitignore
Dockerfile
img
License
.codecov.yml
*.md
LICENSE
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build dotenv-linter
run: |
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
mv target/x86_64-unknown-linux-musl/release/dotenv-linter ./dotenv-linter
chmod +x dotenv-linter
- name: Build and push image
run: |
GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1` | sed "s/v//")
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### 🚀 Added

### 🔧 Changed
- Use `Line.get_key` in all checks [#89](https://github.com/mgrachev/dotenv-linter/pull/89) ([@pineapplethief](https://github.com/pineapplethief))
- Refactor `Github Actions` and reduce `Docker Image size` [#90](https://github.com/mgrachev/dotenv-linter/pull/89) ([@Macbet](https://github.com/Macbet))
- Use `Line.get_key` in all checkers [#89](https://github.com/mgrachev/dotenv-linter/pull/89) ([@pineapplethief](https://github.com/pineapplethief))

## [v1.1.1] - 2020-02-18
### 🔧 Changed
Expand Down
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM alpine:latest
FROM rust:1.41 as builder
WORKDIR /app
COPY . /app
RUN cargo build --release && \
chmod +x target/release/dotenv-linter

COPY dotenv-linter /usr/local/bin/
FROM scratch

ENTRYPOINT ["dotenv-linter"]
COPY --from=builder /app/target/release/dotenv-linter /
ENTRYPOINT ["/dotenv-linter"]

0 comments on commit ba4a4db

Please sign in to comment.