Skip to content

Cannot match release with uname -m with Arm based Docker image #49

@back-2-95

Description

@back-2-95

Expected Behavior

Matching Envplate release with uname -m does not work in Dockerfile for M1 (arm), please see:

curl -LJ --silent https://github.com/kreuzwerker/envplate/releases/download/v1.0.3/envplate_1.0.3_Linux_$(uname -m).tar.gz -o envplate_aarch64.tar.gz

I use this to go around:

#
# Envplate
#
FROM alpine AS envplate-builder

ARG REPO=https://github.com/kreuzwerker/envplate/releases/download
ARG VERSION=1.0.3

WORKDIR /tmp
RUN apk add curl

RUN <<EOF
curl -LJ --silent ${REPO}/v${VERSION}/envplate_${VERSION}_Linux_arm64.tar.gz -o envplate_aarch64.tar.gz
curl -LJ --silent ${REPO}/v${VERSION}/envplate_${VERSION}_Linux_x86_64.tar.gz -o envplate_x86_64.tar.gz
tar -xf envplate_$(uname -m).tar.gz
chmod +x envplate
EOF

Actual Behavior

  • uname -m will give aarch64 instead and thus cannot match to arm64 in release filename.

Steps to Reproduce (including precondition)

Try building Docker image with this Dockerfile in M1/M2 Mac (Silicon/ARM processor):

FROM alpine

RUN apk add curl
RUN curl -LJ --silent https://github.com/kreuzwerker/envplate/releases/download/v1.0.3/envplate_1.0.3_Linux_$(uname -m).tar.gz

Your Environment

  • OS: Alpine 3.18
  • envplate version: 1.0.2, 1.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions