Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Commit fe144c2

Browse files
committed
Support crystal v1.0.0
Update the libraries and crystal version to 1.0.0 Switched to alpine version of crystal to build a static linking build in Dockerfile. It helps to decrease the size of docker image from 200MB to 20MB. Reason to use Alpine: Static linking is not working properly with glibc.
1 parent 30de914 commit fe144c2

6 files changed

Lines changed: 15 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
10+
## [0.1.10] - 2021-04-17
911
### Added
1012
- Allow to download pure orginal JSON by url (@miry)
1113

1214
### Changed
1315
- Add ISO8601 format date in the result post filename (@miry)
1416
- Use crystal lang 0.36.1 (@miry)
17+
- Use crystal lang 1.0.0 (@miry)
18+
- Update docker image to use alpine instead ubuntu and static linked libs (@miry)
1519

1620
## [0.1.9] - 2020-09-17
1721
### Changed

Dockerfile

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
1-
FROM crystallang/crystal:0.35.1 as builder
1+
FROM crystallang/crystal:1.0.0-alpine as builder
22

33
WORKDIR /app
4-
COPY ./shard.yml /app/
4+
COPY ./shard.yml ./shard.lock /app/
55
RUN shards install --production -v
66

77
COPY . /app/
8-
RUN shards build --production -v
8+
RUN shards build --production -v --static
99

10-
FROM ubuntu:bionic
11-
RUN \
12-
apt-get update && \
13-
apt-get install -y \
14-
ca-certificates \
15-
libssl1.1 \
16-
libssl-dev \
17-
libevent-2.1.6 \
18-
libxml2-dev \
19-
libyaml-dev \
20-
libgmp-dev \
21-
libevent-dev && \
22-
apt-get clean && \
23-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
10+
FROM alpine:latest
2411
WORKDIR /
2512
COPY --from=builder /app/bin/medup .
2613

shard.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: medup
22
repository: https://github.com/miry/medup.git
3-
version: 0.1.9
3+
version: 0.1.10
44

55
authors:
66
- Michael Nikitochkin <miry.sof@gmail.com>
@@ -12,7 +12,7 @@ targets:
1212
medup:
1313
main: src/cli.cr
1414

15-
crystal: 0.36.1
15+
crystal: 1.0.0
1616

1717
license: LGPL-3.0
1818

src/medium/post/paragraph.cr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require "json_mapping"
22
require "zaru_crystal/zaru"
3+
require "json_mapping"
34

45
module Medium
56
class Post

src/medup/version.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Medup
2-
VERSION = "0.1.9"
2+
VERSION = "0.1.10"
33
end

0 commit comments

Comments
 (0)