chore: add Elixir container.
This commit is contained in:
parent
1dd145b009
commit
f8db5949a3
3 changed files with 46 additions and 8 deletions
31
.drone.yml
31
.drone.yml
|
@ -22,15 +22,17 @@ steps:
|
|||
path-style: true
|
||||
mount: .docker-build-cache
|
||||
|
||||
- name: build base container
|
||||
- name: dev-container:base
|
||||
image: thegeeklab/drone-docker-buildx:24
|
||||
privileged: true
|
||||
depends_on:
|
||||
- retrieve build cache
|
||||
settings:
|
||||
username: james
|
||||
password:
|
||||
from_secret: REGISTRY_TOKEN
|
||||
registry: code.harton.nz
|
||||
repo: code.harton.nz/james/dev_container
|
||||
repo: code.harton.nz/james/dev-container/base
|
||||
cache_from: 'type=local\\,src=.docker-build-cache'
|
||||
cache_to: 'type=local,dest=.docker-build-cache'
|
||||
provenance: false
|
||||
|
@ -42,6 +44,28 @@ steps:
|
|||
- linux/arm64
|
||||
- linux/amd64
|
||||
|
||||
- name: dev-container:elixir
|
||||
image: thegeeklab/drone-docker-buildx:24
|
||||
privileged: true
|
||||
depends_on:
|
||||
- dev-container:base
|
||||
settings:
|
||||
username: james
|
||||
password:
|
||||
from_secret: REGISTRY_TOKEN
|
||||
registry: code.harton.nz
|
||||
repo: code.harton.nz/james/dev-container/elixir
|
||||
cache_from: 'type=local\\,src=.docker-build-cache'
|
||||
cache_to: 'type=local,dest=.docker-build-cache'
|
||||
provenance: false
|
||||
context: ./elixir
|
||||
dockerfile: ./elixir/Dockerfile
|
||||
tags:
|
||||
- latest
|
||||
platforms:
|
||||
- linux/arm64
|
||||
- linux/amd64
|
||||
|
||||
- name: store build cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
|
@ -51,6 +75,9 @@ steps:
|
|||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: SECRET_ACCESS_KEY
|
||||
AWS_PLUGIN_PATH_STYLE: true
|
||||
depends_on:
|
||||
- dev-container:base
|
||||
- dev-container:elixir
|
||||
settings:
|
||||
rebuild: true
|
||||
endpoint:
|
||||
|
|
|
@ -15,11 +15,11 @@ RUN apt-get -q -y update && \
|
|||
unixodbc-dev unzip wget xz-utils zlib1g-dev zsh gnupg inotify-tools less \
|
||||
postgresql-client ssh direnv && apt-get -q -y clean
|
||||
|
||||
ARG LANG=en_NZ
|
||||
RUN locale-gen $LANG.UTF-8
|
||||
ENV LANG $LANG.UTF-8
|
||||
ENV LANGUAGE $LANG:en
|
||||
ENV LC_ALL $LANG.UTF-8
|
||||
ARG LOCALE=en_NZ
|
||||
RUN locale-gen $LOCALE.UTF-8
|
||||
ENV LANG $LOCALE.UTF-8
|
||||
ENV LANGUAGE $LOCALE:en
|
||||
ENV LC_ALL $LOCALE.UTF-8
|
||||
|
||||
ARG USERNAME=vscode
|
||||
ARG USER_UID=1000
|
||||
|
@ -31,15 +31,20 @@ RUN touch /entrypoint.sh && chown ${USERNAME}:${USERNAME} /entrypoint.sh
|
|||
RUN mkdir -p /var/tmp/history && chown -R ${USERNAME}:${USERNAME} /var/tmp/history
|
||||
RUN mkdir /storage && chown ${USERNAME}:${USERNAME} /storage
|
||||
|
||||
|
||||
# Install starship.
|
||||
RUN curl -sS https://starship.rs/install.sh > install.sh
|
||||
RUN chmod 755 install.sh
|
||||
RUN ./install.sh --yes
|
||||
RUN rm install.sh
|
||||
|
||||
COPY asdf /usr/local/bin/
|
||||
RUN chmod 755 /usr/local/bin/asdf
|
||||
COPY asdf_install /usr/local/bin/
|
||||
RUN chmod 755 /usr/local/bin/asdf_install
|
||||
|
||||
USER ${USERNAME}
|
||||
ENV HOME=/home/${USERNAME}
|
||||
ENV PATH=/usr/local/bin:${PATH}
|
||||
|
||||
WORKDIR $HOME
|
||||
|
||||
|
|
6
elixir/Dockerfile
Normal file
6
elixir/Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
|||
FROM code.harton.nz/james/dev-container/base
|
||||
|
||||
RUN asdf asdf plugin add erlang
|
||||
RUN asdf asdf install erlang latest
|
||||
RUN asdf asdf plugin add elixir
|
||||
RUN asdf asdf install elixir latest
|
Loading…
Reference in a new issue