Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
125209a99b
|
|||
|
934598b6c7
|
|||
|
8cc12dfd2c
|
|||
|
2286d8a63b
|
|||
|
ed7ae83a9d
|
@@ -1,6 +1,6 @@
|
||||
name: Create and publish a Docker image
|
||||
|
||||
# Configures this workflow to run every time a change is pushed to the main branch with a semvar tag.
|
||||
# Configures this workflow to run every time a change is pushed to the main branch with a semver tag.
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
@@ -47,9 +47,7 @@ jobs:
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semvar,pattern={{version}}
|
||||
type=sha
|
||||
type=semver,pattern={{version}}
|
||||
type=raw,value=latest
|
||||
- name: Build and push Docker image
|
||||
id: push
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
FROM docker.io/swift:latest AS build
|
||||
ARG SWIFT_VERSION="swift:latest"
|
||||
ARG SWIFT_BACKTRACE="enable=no"
|
||||
|
||||
FROM docker.io/${SWIFT_VERSION} AS build
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
|
||||
&& apt-get -q update \
|
||||
@@ -13,7 +16,7 @@ RUN rustup default stable && \
|
||||
/root/.cargo/bin/bob install nightly && \
|
||||
/root/.cargo/bin/bob use nightly
|
||||
|
||||
FROM docker.io/swift:latest
|
||||
FROM docker.io/${SWIFT_VERSION}
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
|
||||
&& apt-get -q update \
|
||||
@@ -34,6 +37,8 @@ PATH="/root/bin:/root/.local/share/bob/nvim-bin:$PATH"
|
||||
alias n='nvim'
|
||||
EOF
|
||||
|
||||
ENV SWIFT_BACKTRACE=${SWIFT_BACKTRACE}
|
||||
|
||||
WORKDIR /root/dev
|
||||
|
||||
VOLUME /root/dev
|
||||
|
||||
14
README.md
14
README.md
@@ -1,8 +1,7 @@
|
||||
# Swift development container
|
||||
|
||||
A development container built off swift / ubuntu as base image. This is needed because
|
||||
I currently can not get swift to install on arch linux, so this
|
||||
is used to develop inside a docker container.
|
||||
A development container built off swift / ubuntu as base image. This is needed because I currently can not get swift to
|
||||
install on arch linux, so this is used to develop inside a docker container.
|
||||
|
||||
## Extra Packages
|
||||
|
||||
@@ -29,10 +28,7 @@ podman run -it --name "$(basename "$PWD")" \
|
||||
|
||||
The default command will open neovim in the `/root/dev` folder.
|
||||
|
||||
The above runs a container and names it so that it can be restarted
|
||||
in the future to continue working on a project.
|
||||
|
||||
The `-w | --workdir` is not required if you mount your project to the
|
||||
`/root/dev` folder, as that is the default declared by the container, it
|
||||
is shown here for clarity.
|
||||
The above runs a container and names it so that it can be restarted in the future to continue working on a project.
|
||||
|
||||
The `-w | --workdir` is not required if you mount your project to the `/root/dev` folder, as that is the default
|
||||
declared by the container, it is shown here for clarity.
|
||||
|
||||
Reference in New Issue
Block a user