-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for local development
Closes #59
- Loading branch information
1 parent
ef71b1b
commit 6679a56
Showing
11 changed files
with
190 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
symenv_debug.log | ||
reflog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
# symenv | ||
|
||
## [1.2.16] - 2022-05-24 | ||
## [1.2.17](https://github.com/platonic-io/symenv/releases/tag/v1.2.17) | ||
|
||
### Added | ||
### Fixed 1.2.17 - 2022-07-20 | ||
|
||
- Fixed artifact ordering by expecting 0s in the artifact counter (#53) | ||
|
||
## [1.2.16](https://github.com/platonic-io/symenv/releases/tag/v1.2.16) | ||
|
||
### Added - 2022-05-24 | ||
|
||
- Login function which is independent from any other commands. | ||
|
||
## [1.2.13] - 2020-03-30 | ||
## [1.2.13](https://github.com/platonic-io/symenv/releases/tag/v1.2.13) | ||
|
||
### Removed | ||
### Removed 1.2.13 - 2022-03-29 | ||
|
||
- Remove ability to install VSCode extension | ||
|
||
### Fixed | ||
### Fixed 1.2.13 | ||
|
||
- Symenv timeout issue with auth requests. It will timeout in 30 seconds now | ||
|
||
## [1.2.12](https://github.com/platonic-io/symenv/releases/tag/v1.2.12) | ||
|
||
## [1.2.12] - 2020-03-28 | ||
|
||
### Fixed | ||
### Fixed 1.2.12 - 2020-03-28 | ||
|
||
- Add error catching for package download failures | ||
- Extract package tar directly to correct directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# shellcheck disable=SC1091 | ||
|
||
CLICOLOR=1 | ||
# shellcheck disable=SC2016 | ||
LESS='-R --use-color -Dd+r$Du+b$' | ||
LSCOLORS="Ea" | ||
PS1='[\[\e[31m\]\u\[\e[0m\]@\[\e[32m\]\H\[\e[0m\]:\[\e[33m\]\w\[\e[0m\]]{\[\e[34m\]$?\[\e[0m\]}\$ ' | ||
SYMENV_DIR="$HOME/.symbiont" | ||
|
||
# shellcheck disable=SC1091 | ||
if [ -f /usr/share/bash-completion/bash_completion ]; then | ||
source /usr/share/bash-completion/bash_completion | ||
fi | ||
|
||
PATH="$SYMENV_DIR/versions/current/bin:$PATH" | ||
|
||
. "$HOME/.symbiont/symenv.sh" | ||
. "$HOME/.symbiont/bash_completion" | ||
|
||
export CLICOLOR | ||
export LESS | ||
export LSCOLORS | ||
export PS1 | ||
export PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/zsh | ||
|
||
export SYMENV_DIR="$HOME/.symbiont" | ||
|
||
# This loads symenv | ||
if [ -f "$SYMENV_DIR/symenv.sh" ]; then | ||
source "$SYMENV_DIR/symenv.sh" | ||
fi | ||
|
||
# This loads symenv managed SDK | ||
if [ -f "$SYMENV_DIR/versions/current" ]; then | ||
export PATH="$SYMENV_DIR/versions/current/bin":$PATH | ||
fi | ||
|
||
# This loads symenv bash_completion | ||
if [ -f "$SYMENV_DIR/bash_completion" ]; then | ||
source "$SYMENV_DIR/bash_completion" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM archlinux/archlinux:base-devel | ||
ARG DATE="2024-10-02" | ||
LABEL org.opencontainers.image.source="https://github.com/platonic-io/symenv" | ||
LABEL org.opencontainers.image.authors="[email protected]" | ||
LABEL org.opencontainers.image.date="${DATE}" | ||
RUN pacman -Syyu --noconfirm \ | ||
bash-completion \ | ||
curl \ | ||
git \ | ||
jq \ | ||
unzip \ | ||
vim \ | ||
wget \ | ||
zip \ | ||
zsh \ | ||
&& ln -sfv /usr/bin/vim /usr/bin/vi \ | ||
&& useradd -s /bin/bash -m -g users -d /home/symenv symenv | ||
COPY docker/.zshrc /home/symenv/.zshrc | ||
COPY docker/.bashrc /home/symenv/.bashrc | ||
USER symenv | ||
RUN curl -L https://raw.githubusercontent.com/symbiont-io/symenv/main/install.sh | bash | ||
WORKDIR /home/symenv/ | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Symenv Docker Build | ||
|
||
There are two steps here. | ||
|
||
1. Build the Docker image to run locally. | ||
|
||
```shell | ||
docker build --build-arg=DATE="$(date +%Y-%m-%d)" \ | ||
-t ghcr.io/platonic-io/symenv:${USER} -f docker/Dockerfile \ | ||
--progress plain . | ||
``` | ||
|
||
2. Run a container named `symenv` with the image we just built. | ||
|
||
```shell | ||
docker run --name symenv -v $(pwd):/usr/src/symenv -it "ghcr.io/platonic-io/symenv:${USER}" bash | ||
``` | ||
|
||
3. From the running container you can list the remote versions available to install. | ||
|
||
```shell | ||
symenv ls-remote --registry=portal.platonic.io --force-auth | ||
``` | ||
|
||
1. Follow the instructions to complete your login. | ||
2. Then attend to the list of available versions produced. | ||
|
||
```shell | ||
✅ Authentication successful | ||
v2.0.0 | ||
v2.0.1 | ||
v2.0.2 | ||
v2.0.3 | ||
v3.0.0 | ||
v4.0.0 | ||
v4.1.0 | ||
``` | ||
|
||
4. Now install one or more of them. | ||
|
||
```shell | ||
symenv install --registry=portal.platonic.io v4.1.0 | ||
``` | ||
|
||
You are now ready to deploy resources to the cloud of your choice. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/bash | ||
|
||
{ # this ensures the entire script is downloaded # | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/usr/bin/env sh | ||
#!/bin/sh | ||
|
||
export SYM_DIR=`pwd` | ||
[ -s "$SYM_DIR/symenv.sh" ] && \. "$SYM_DIR/symenv.sh" | ||
SYM_DIR="$(pwd)" | ||
|
||
export SYM_DIR | ||
|
||
if [ -s "$SYM_DIR/symenv.sh" ]; then | ||
/bin/sh "$SYM_DIR/symenv.sh" | ||
fi |