Skip to content

Commit

Permalink
Add alpine 3.13 container image
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Apr 14, 2021
1 parent 29d2279 commit ee4848a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM alpine:3.13

USER root

ARG FVM_VERSION
ARG GLIBC_VERSION="2.28-r0"

# Install Required Tools
RUN apk -U update && apk -U add \
bash \
ca-certificates \
curl \
git \
make \
libstdc++ \
libgcc \
mesa-dev \
unzip \
wget \
zlib \
&& wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -O /etc/apk/keys/sgerrand.rsa.pub \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk -O /tmp/glibc.apk \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk -O /tmp/glibc-bin.apk \
&& apk add /tmp/glibc.apk /tmp/glibc-bin.apk \
&& rm -rf /tmp/* \
&& rm -rf /var/cache/apk/* \
&& addgroup -g 1000 flutter \
&& adduser -u 1000 -G flutter -s /bin/bash -D flutter

USER flutter

ARG HOME=/home/flutter

ENV PATH=$HOME/fvm:$HOME/.pub-cache/bin:$HOME/fvm/default/bin:${PATH}

RUN cd $HOME \
&& wget https://github.com/leoafarias/fvm/releases/download/${FVM_VERSION}/fvm-${FVM_VERSION}-linux-x64.tar.gz \
&& tar -xf fvm-${FVM_VERSION}-linux-x64.tar.gz \
&& rm fvm-${FVM_VERSION}-linux-x64.tar.gz \
&& fvm --version
9 changes: 9 additions & 0 deletions .github/workflows/cli_deploy_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@ jobs:
file: ./.docker/Dockerfile
push: true
tags: leoafarias/fvm:${{ github.event.release.tag_name }}
build-args: FVM_VERSION=${{ github.event.release.tag_name }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: ./.docker/alpine/Dockerfile
push: true
tags: leoafarias/fvm-alpine:${{ github.event.release.tag_name }}
build-args: FVM_VERSION=${{ github.event.release.tag_name }}

0 comments on commit ee4848a

Please sign in to comment.