Skip to content

Commit

Permalink
Closes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Dec 15, 2019
1 parent 3113ab4 commit d07045a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.md
.*
Dockerfile
docker-compose.yml
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install:
script:
- docker ps | grep -q caddy-gen # there should be a docker process
- curl 127.0.0.1:2015 # it should be available and return 404
- disl caddy-gen:latest 30MB
- disl caddy-gen:latest 75MB

notifications:
email:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ We used to have incremental versioning before `0.1.0`.
- Updates `Caddy` version to `0.10.12`
- Adds `"virtual.websockets"` configuration to work with websockets
- Adds `docker-image-size-limit`
- Minifies image as possible


## Version 0.1.0
Expand Down
38 changes: 14 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,30 @@ FROM alpine:3.10.3

LABEL maintainer="Nikita Sobolev <[email protected]>"
LABEL vendor="wemake.services"
LABEL version="0.1.0"
LABEL version="0.2.0"

ARG CADDY_VERSION="0.10.12"
ARG FOREGO_VERSION="0.16.1"
ARG DOCKER_GEN_VERSION="0.7.4"

ENV CADDYPATH="/etc/caddy"
ENV DOCKER_HOST unix:///tmp/docker.sock
ENV DOCKER_HOST="unix:///tmp/docker.sock"


# Install wget and install/updates certificates

# Install all dependenices:
RUN apk update && apk upgrade \
&& apk add --no-cache bash openssh-client git \
&& apk add --no-cache --virtual .build-dependencies curl wget tar


# Install Forego

RUN wget --quiet "https://github.com/jwilder/forego/releases/download/v${FOREGO_VERSION}/forego" \
&& apk add --no-cache --virtual .build-dependencies curl wget tar \
# Install Forego
&& wget --quiet "https://github.com/jwilder/forego/releases/download/v${FOREGO_VERSION}/forego" \
&& mv ./forego /usr/bin/forego \
&& chmod u+x /usr/bin/forego


# Install docker-gen

RUN wget --quiet "https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VERSION/docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION.tar.gz" \
&& tar -C /usr/bin -xvzf "docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION.tar.gz" \
&& rm "/docker-gen-alpine-linux-amd64-$DOCKER_GEN_VERSION.tar.gz"


# Install Caddy

RUN curl --silent --show-error --fail --location \
&& chmod u+x /usr/bin/forego \
# Install docker-gen
&& wget --quiet "https://github.com/jwilder/docker-gen/releases/download/${DOCKER_GEN_VERSION}/docker-gen-alpine-linux-amd64-${DOCKER_GEN_VERSION}.tar.gz" \
&& tar -C /usr/bin -xvzf "docker-gen-alpine-linux-amd64-${DOCKER_GEN_VERSION}.tar.gz" \
&& rm "/docker-gen-alpine-linux-amd64-${DOCKER_GEN_VERSION}.tar.gz" \
# Install Caddy
&& curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/mholt/caddy/releases/download/v${CADDY_VERSION}/caddy_v${CADDY_VERSION}_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin -xz \
Expand All @@ -49,7 +39,7 @@ VOLUME /etc/caddy

# Starting app:

ADD . /code
COPY . /code
WORKDIR /code

ENTRYPOINT ["sh", "/code/docker-entrypoint.sh"]
Expand Down

0 comments on commit d07045a

Please sign in to comment.