chore: add Elixir container.
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing

This commit is contained in:
James Harton 2023-08-24 20:24:33 +12:00
parent 1dd145b009
commit f8db5949a3
Signed by: james
GPG key ID: 90E82DAA13F624F4
3 changed files with 46 additions and 8 deletions

View file

@ -22,15 +22,17 @@ steps:
path-style: true path-style: true
mount: .docker-build-cache mount: .docker-build-cache
- name: build base container - name: dev-container:base
image: thegeeklab/drone-docker-buildx:24 image: thegeeklab/drone-docker-buildx:24
privileged: true privileged: true
depends_on:
- retrieve build cache
settings: settings:
username: james username: james
password: password:
from_secret: REGISTRY_TOKEN from_secret: REGISTRY_TOKEN
registry: code.harton.nz 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_from: 'type=local\\,src=.docker-build-cache'
cache_to: 'type=local,dest=.docker-build-cache' cache_to: 'type=local,dest=.docker-build-cache'
provenance: false provenance: false
@ -42,6 +44,28 @@ steps:
- linux/arm64 - linux/arm64
- linux/amd64 - 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 - name: store build cache
image: meltwater/drone-cache image: meltwater/drone-cache
pull: true pull: true
@ -51,6 +75,9 @@ steps:
AWS_SECRET_ACCESS_KEY: AWS_SECRET_ACCESS_KEY:
from_secret: SECRET_ACCESS_KEY from_secret: SECRET_ACCESS_KEY
AWS_PLUGIN_PATH_STYLE: true AWS_PLUGIN_PATH_STYLE: true
depends_on:
- dev-container:base
- dev-container:elixir
settings: settings:
rebuild: true rebuild: true
endpoint: endpoint:

View file

@ -15,11 +15,11 @@ RUN apt-get -q -y update && \
unixodbc-dev unzip wget xz-utils zlib1g-dev zsh gnupg inotify-tools less \ unixodbc-dev unzip wget xz-utils zlib1g-dev zsh gnupg inotify-tools less \
postgresql-client ssh direnv && apt-get -q -y clean postgresql-client ssh direnv && apt-get -q -y clean
ARG LANG=en_NZ ARG LOCALE=en_NZ
RUN locale-gen $LANG.UTF-8 RUN locale-gen $LOCALE.UTF-8
ENV LANG $LANG.UTF-8 ENV LANG $LOCALE.UTF-8
ENV LANGUAGE $LANG:en ENV LANGUAGE $LOCALE:en
ENV LC_ALL $LANG.UTF-8 ENV LC_ALL $LOCALE.UTF-8
ARG USERNAME=vscode ARG USERNAME=vscode
ARG USER_UID=1000 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 -p /var/tmp/history && chown -R ${USERNAME}:${USERNAME} /var/tmp/history
RUN mkdir /storage && chown ${USERNAME}:${USERNAME} /storage RUN mkdir /storage && chown ${USERNAME}:${USERNAME} /storage
# Install starship. # Install starship.
RUN curl -sS https://starship.rs/install.sh > install.sh RUN curl -sS https://starship.rs/install.sh > install.sh
RUN chmod 755 install.sh RUN chmod 755 install.sh
RUN ./install.sh --yes RUN ./install.sh --yes
RUN rm install.sh 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} USER ${USERNAME}
ENV HOME=/home/${USERNAME} ENV HOME=/home/${USERNAME}
ENV PATH=/usr/local/bin:${PATH}
WORKDIR $HOME WORKDIR $HOME

6
elixir/Dockerfile Normal file
View 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