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

mix docker.release causes a missing environment error in gitlab ci #52

@imerkle

Description

@imerkle
#Dockerfile.release 
FROM bitwalker/alpine-elixir:latest

# install gcc make
RUN set -x\
 && apk add --no-cache\
  gcc\
  make\
  musl-dev

EXPOSE 8000
ENV PORT=8000 MIX_ENV=prod REPLACE_OS_VARS=true SHELL=/bin/bash
WORKDIR /app
COPY ./myapp.tar.gz ./
RUN tar xfz myapp.tar.gz
ENTRYPOINT ["bin/myapp"]
$ mix docker.release
** (MatchError) no match of right hand side value: {:error, :missing_environment}
    lib/mix_docker.ex:193: MixDocker.release_version/0
    lib/mix_docker.ex:29: MixDocker.release/1
    (mix) lib/mix/task.ex:301: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:75: Mix.CLI.run_task/2
    (elixir) lib/code.ex:376: Code.require_file/2

mix docker.build works but not release.
also it works in my own computer just not in ci

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